Skip to content

Instantly share code, notes, and snippets.

@carlynorama
Last active August 29, 2015 14:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
#!/bin/bash
#Leaves the stats area intact and a 2px black
#border on the other edges. Saves file to a
#sub-direcotry
if [ ! -d ./PROCESSED ]; then mkdir ./PROCESSED;
fi
# processes all pngs
if ls | grep png; then for p in *.png;
do
echo "Processing $p"
convert \( $p -gravity south -crop 1204x862+0+0 +repage \) \
-background black -splice 0x2 \
./PROCESSED/${p/.png}_stats.png
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment