Skip to content

Instantly share code, notes, and snippets.

#!/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