Skip to content

Instantly share code, notes, and snippets.

@keepitcomplicated
Last active September 9, 2018 23:38
Show Gist options
  • Save keepitcomplicated/10731533 to your computer and use it in GitHub Desktop.
Save keepitcomplicated/10731533 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