Skip to content

Instantly share code, notes, and snippets.

@felixr
Created July 10, 2014 21:26
Show Gist options
  • Save felixr/d18609f5878766939f28 to your computer and use it in GitHub Desktop.
Save felixr/d18609f5878766939f28 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Create animated gif by rotating a GIF
ORIG=$1
i=100
for deg in `seq 0 30 330 | xargs`; do
i=`expr $i + 1`
convert ${ORIG} \( +clone -background none -rotate $deg \) -gravity center -compose Src -composite loading_$i.gif
done
gifsicle --delay=15 --loop loading_*.gif > loading-anim.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment