Skip to content

Instantly share code, notes, and snippets.

@banzalik
Forked from keepitcomplicated/gist:10731533
Created October 31, 2015 12:43
Show Gist options
  • Save banzalik/2b623dfadb16548cd255 to your computer and use it in GitHub Desktop.
Save banzalik/2b623dfadb16548cd255 to your computer and use it in GitHub Desktop.
Convert a PNG sprite to animated GIF with ImageMagick (python script)
mkdir ./gif; for f in *.png; do y=${f%.png}; convert -dispose 3 -delay 0 -deconstruct -loop 0 ./$f -crop 40x40 +repage -depth 4 ./gif/$y.gif; echo "Converting $y to GIF"; echo "—~—~—~—~—~—~—~—~—~—~—~–"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment