imagemagick

Convert a sequence of images to gif, with transparency

convert -loop 0 -delay 6 -alpha set -dispose previous *.png output.gif

Split a sprite atlas

This chops an atlas into 32x32 pixel squares

convert atlas.png -crop 32x32 sprite.png

this trims empty pixels surrounding each sprite

convert atlas.png -crop 32x32 -trim sprite.png