Animated GIFs with ImageMagick

It's really easy to create an animated GIF from a bunch of frames on the command line using ImageMagick.

By Matthew Malinowski, 2012-12-04

I had a happy discovery today when looking for ways to get iTerm2 to not render bold fonts so poorly.

StackExchange user Lauri Ranta posted a pair of animated GIFs in this answer, and a commenter asked how they were made.

The reply:

for f in .png; do convert "$f" -flatten -pointsize 20 -gravity south -annotate +0+25 "${f%.png}" "x$f"; done and convert -delay 200 x.png output.gif

Awesome! An easy way to make animated GIFs from PNG.

For many more amazing things, ImageMagick-related and otherwise, check out this list of handy shell commands on Lauri's site.

Back to Blog Index...