Making Animated GIF Images

21 Nov 2014  Posted under: osx , random

I enjoy taking pictures, so I tend to take a lot of them. One of the things I enjoy is taking panda bursts, the name I use for the camera mode where you hold down the button and it continuously takes pictures. The usual reason for doing this is to try to capture a moment that would otherwise pass by - like people crashing into a tree while skiing or an eagle snatching a fish out of the water. Anyways, when you do this you end up with lots of pictures of which you usually only want to keep one.

So, I was going through photos selecting which ones I wanted to post online when I realized that my panda bursts would make really nice gifs. The last time I made a gif was 14 years ago, so I needed to find some instructions. And since these articles are really just a convenient way for me to find things I will probably forget later, I have put those instructions here!

I use Picasa to organize my photo collection, so the first step was to make a directory of the pictures to use as the “frames” of the animation. The source images needed to be decreased in size, so I exported the photos from picasa with low quality, and size 800 pixels. The next step involved using The Gimp photo editor, which has historically been a bummer since running x11 programs in OSX just feels… sad. Fortunately, since the last time I needed to use the Gimp some nice people decided to make a native port of it for OSX, which you can download here. It looks fantastic, and is actually quite nice to use now. The version I am linking to comes with some extra plugins, otherwise you can also download from the gimps project page.

Making the GIF is pretty easy, I ended up using instructions from one of the gimp tutorials. Open up the first frame of the image in Gimp, and then drag the rest of the images as a group into the layer tool so they are in order. Next, the order of the layers needs to be reversed, otherwise your animation will run backwards. After you are happy with the order, optimize the layers for making a GIF (this helps decrease the size by removing duplicate information) and specifiing you want to use indexed color. If you do the optimization and then switch the order of the layers you will get strange artifacts. Finally, you export it as a looping GIF.

TL;DR GIF Instructions

  1. Export images from Picasa to low quality, size 800 pixels
  2. Open first image in gimp
  3. Drag the rest of the images into the Layer Tool, they should be in order
  4. Reverse the order (Layer -> Stack -> Reverse Layer Order)
  5. Optimize for gif (Filters -> Animation -> Optimize (For Gif)). This will reduce the size a lot
  6. Change to indexed color (Image -> Mode -> Indexed). More colors and dithering will increase size
  7. Export as GIF, As Animation, Loop forever, 250 millisecond delay, use delay for all frames.