About the author

Love interactivity, programming, music and the web.

Currently work using Ruby/Rails, JavaScript and ActionScript, but know other languages.

Developer at Ocapi

Find me on

Animate Spritesheets With ImageMagick

April 19th 2011

ImageMagick is generic purpose command line tool to manipulate images. In this example I’ve used the convert tool to transform a PNG spritesheet into an animated gif.

PNG file:

Match Walking Sprite

Command line:

convert match-walking.png -crop 65x65 +repage \
-set dispose background -loop 0 -set delay 10 \
match-walking.gif

GIF result:

Match Walking Animation

You basically need to give origin, destiny and your sprite dimensions.

Pretty nice, uh?

Tags: imagemagick gif sprite