You can easily create animated GIFs from the command line in Mac OS X (or Linux) using ImageMagick. To figure out if ImageMagick is installed open the application Terminal from the Utilities folder in Applications, type ‘convert’ and hit ‘Enter’. If something like »Version: ImageMagick 6.6.9-3 2011-04-04 Q16« and lots of options appear, ImageMagick is installed and you can proceed. If not, you can install it using MacPorts (look for ‘Mac OS X Binary Release’). install it using homebrew or MacPorts.

An animated GIF works like a flip-book, i.e. you need source images that can be stringed together to an animated GIF. In order to work with the following command, name your source images ‘source1.jpg’, ‘source2.jpg’ and so on. After you created the source images, ‘cd’ in the Terminal to their folder. If you don’t know how to ‘cd’: Type ‘cd’ followed by a space and then drag the folder with the source images to the Terminal and hit ‘Enter’. Now copy, paste and execute this command in the Terminal:

convert -delay 35 -loop 0 source*.jpg animated.gif

Play around with the delay parameter in order to see how the animated GIF changes.

Using convert, I created animated GIFs like this:

via Creating an Animated GIF Image

Published by Johannes Luderschmidt

About this blog