Creating animated Gifs from image files in Mac OS X (or Linux)

I was trying to create an animated gif from a bunch of images. My first reaction was to google something like: "create animated gif Mac OS X", but then I realize that I'm using a unix box, so lets do it the "simple" way with ImageMagick.

From its site:
ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

I used ImageMagick a lot through PHP. Its pretty straightforward and very fast.

Let's install it using brew:

~ brew install imagemagick 

Open your terminal, junp to the directory containing the images and run this command:

~ convert -delay 10 *.JPG animated_output.gif

This will generate animated_output.gif with a delay between frames of 0.10s

This is the result:

Related links:

No hay comentarios.:

Publicar un comentario