For those of us who aren’t doing professional-grade work with images, GIMP is one of the best tools ever created. It may not be as polished as Photoshop or have quite as many capabilities — or at least so I’ve been told since I’ve never actually used Photoshop — but for the low cost of free GIMP is an incredible tool for anyone needing capabilities a little better than what is offered by the likes of MS Paint. Recently, I wanted to use GIMP to take a series of photos and turn them into an animated GIF. I knew that GIMP had the ability to achieve this, but it was surprisingly difficult to find straightforward instructions online. That being said, I figured I would write my own since I’m sure it would be beneficial to someone else.
Note that at the time of this writing GIMP is at version 2.8.8. The steps could change a little bit in the future after upgrades to the software. I’m also doing this with GIMP installed on Windows 8.1, though I couldn’t see the steps being different on other platforms. Lastly, I’m going through this with the goal of posting the final GIF to Tumblr. This imposes some extra steps due to Tumblr’s size and dimension limitations (under 1 MB, no more than 500 pixels on the longest edge.) You could skip some of the optimization pieces if you’re unconcerned about the final size.
The first thing to do is to open your series of images in GIMP as different layers. It should be obvious, but having the images you’re using set aside in their own folder makes it easier. Opening them as layers is easily done by going to File > Open as Layers. Navigate to your images and use Shift + click to select them all. You will see new layers added on the right side of GIMP. Next, click the lock symbol next to the eye icon to lock all of the layers together. This will allow you to bulk re-size the pictures, as the longest edges of mine are 640 pixels.
Now you’ll want to actually resize them. Right-click on the image currently being displayed, go to Image and then select Scale Image. In the new window that pops up, make sure the lock icon isn’t broken between the Width and Height values so that GIMP will automatically keep the current aspect ratio. Change the longest edge to 500 and hit Enter so that the other value automatically changes as well. Then click the Scale button.
Now we need to do a few things to reduce the size of the files so that the GIF isn’t huge. First, go to Image menu at the top of the screen. Select Mode and then click Indexed – it will likely be on RGB by default. In the Index window you get a few options for how GIMP should handle the colors used. I like to use the Use web-optimized palette option, but that can sometimes cause issues with lowering the quality a bit too much, especially if you’re using photos with a lot of dark colors. In that case, you may just need to use the Generate optimum palette option and play around with how many colors you can get away with having. Once you’re done, click the Convert button.
Next up, we can further optimize the set of images. For this go to the Filters menu at the top of the screen and then head to Animation. Then select Optimize (for GIF). That’s it for the optimization. Now you can just save the series of layers as a GIF and GIMP will do the rest. Head to the File menu and then select Export. Pick the location for your file, name it, and make sure you specify a .gif extension. Then click the Export button. A new window will appear with some final options. Make sure you check the As Animation box so your GIF will actually be animated. I also like them to loop forever. Specify the delay you want in your images; it’s usually something I have to play around with depending on what exactly I’m animating. I also like to check the Use delay entered above for all frames box so they have a uniform time. When you’re satisfied, click the Export button.
You’ll now have a GIF file at the location you specified. For going through this blog post, below is the GIF I created. I started with 10 images, and I used a 250 color palette as web-optimized took away too many colors. The delay is 250 milliseconds for all frames, and the total size is 751 KB, meaning it could be posted to Tumblr without any issues.