Home > Utility > Create Animated GIFs with Mac OS X Preview.app

Create Animated GIFs with Mac OS X Preview.app

If you open an animated GIF in Mac OS X’s Preview application, the default application for viewing images and PDFs, you may know that you can see individual frames of the animation, but did you know you can also create animated GIFs with Preview? Here’s how.

All Your Base Are Belong To Us

How To

For this example, we will create an animated GIF of us typing some text into a text editor. Preview sets the interframe delay to 0.1 seconds, and I have not seen a way to change that. That is a reasonable typing speed for this effect.

Open a text editor such as TextEdit, TextMate, BBEdit, etc. Resize the window so that it’s a nice, tight size that will look good on a web page.

Blank Document

The first thing you might notice between the screenshot above and the animated GIF at the beginning is that the shadow looks better on this screenshot. That’s because GIF images can only contain 256 different colors, and that’s not enough to see the subtle changes in the shadow.

Save this opening shot by typing Command-Shift-4. Release those keys and type Space. Now click on the text editor window. That creates a screen capture of just the window you clicked and saves it to the desktop.

Open that file in Preview. Choose Save As from the File menu. Select GIF as the file type. Name the file something meaningful like animation.gif. You can now delete the original screen capture image so you don’t accidentally duplicate it during the next steps.

Saved as GIF

We’ll want to see the sidebar so we can add images to the GIF sequence. Click the Sidebar button in the toolbar.

With Sidebar Showing

Let’s just add one character ‘A’ to the text editor, and add that to the sequence.

  1. Type ‘A’ in the text editor window.
  2. Type Command-Shift-4.
  3. Type Space.
  4. Click on the text editor window.
  5. Find the captured image on your Desktop, and drag it onto the Preview window, directly over the “animation.gif” image in the sidebar.

Dragging Image Over First Frame

Your Preview window should look something like this now:

After Two Frames

Now let’s capture several frames at once to speed this along. After each character that we type in the text editor, we’ll type Command-Shift-4, Space, and click on the text editor window, creating many screenshots saved to the desktop.

Select all of these new screenshots on the desktop, and drag them to the Preview window as shown below so that you tell Preview to add the images to the sequence you began (as opposed to simply opening more files, which it will do if you drag too low on the sidebar).

Dragging Several Files

You’ve got it now. Continue with more frames, and save your GIF. Drag the GIF image to Safari or other animated GIF-enabled viewer, and enjoy. Unfortunately I haven’t found a way to loop the animation in Preview.

Categories: Utility Tags: , , ,
  1. May 27th, 2010 at 12:16 | #1

    Thank you Robert for a really good explanation of to (easily) create animated gifs. I have followed the steps and it works fine.

    If you want to control the interframe delay, GIFBuilder is a free and easy to use tool for OS X. See http://www.nyctergatis.com/gifbuilder/

    SR

  2. Adrian Boeing
    August 3rd, 2010 at 20:35 | #2

    Is there another way to add looping or interframe delay? Gifbuilder isn’t supported on the Intel, or OSX snow leopard.

  3. August 4th, 2010 at 12:21 | #3

    If you like the command line, you can use ImageMagick’s “convert” command to modify the gif properties like so:

    convert -delay 3 -loop 0 base.gif base-fast-repeat.gif

    For that matter, you probably could have done screen captures direct to file and then used ImageMagick to build the gif directly.

    -Rob

  4. rueli
    September 9th, 2010 at 01:14 | #4

    I swear, my older Mac’s Preview (10.3.9) had a button that you can place on the top toolbar that was a ‘play’ button for gifs. I cannot find it in the newest Mac Preview. But I KNOW it was there!

  5. December 7th, 2010 at 01:34 | #5

    WOW! Great Tutorial! took me a few seconds though to figure out you were supposed to drag the GIF’s on the BASE GIF, and not on the general sidebar, but hey! it works!

    My tip for you guys: if 0.1 seconds is too fast for you, what I did was to create 10 copies of each frame, and then dragged all 10 copies into the same GIF. Effectively then 10 copies played at 0.1 seconds each – resulting in a singular image that LOOKS like it plays for 1 second, but is actually a set of 10 images playing at 0.1 seconds each.

    Sneaky….

    Thanks for the tip!

    MUCH EASIER than Photoshop…

    MACS RULE!

  6. Luso
    January 22nd, 2011 at 03:50 | #6

    What did you mean by drag them onto the base GIF?

  7. January 25th, 2011 at 16:01 | #7

    When you have the sidebar open, Preview shows you all the frames within the GIF (initially just one frame). You’ll have two windows open, each with their sidebars open, and you’ll drag an image from one sidebar to the other (that is, from the “second” frame to the “base” frame). Good luck. -Rob

  8. Lance
    February 15th, 2011 at 23:27 | #8

    Doesn’t work. When I drag the second image to the drawer, it can only go above or below the first image, not over the top of it. There is no option to combine the two images, so my Preview is a non-animation version.

  9. Al
    February 26th, 2011 at 18:08 | #9

    Same as Lance! I can only place more files above or below the existing file in the preview sidebar. I’m using Leopard; maybe this can only be done in snow leopard.

  10. March 9th, 2011 at 10:48 | #10

    @Lance, @Al This can happen if you don’t first save the (first) image as a GIF so that Preview knows it should accept multiple images per file. See if that’s the problem.

  11. George
    March 30th, 2011 at 12:13 | #11

    Same problem as Lance and Al for me. Tried your suggestion, Robert, but still no joy.

    Any ideas?

    Thank you.

  12. March 30th, 2011 at 14:06 | #12

    @Lance, @Al, @George Sorry, not sure what’s going wrong. It’s probably some step I’m leaving out, but I can’t see what it is. -Rob

  13. Kristie Satterly
    April 21st, 2011 at 12:47 | #13

    Thanks for the tip! I used this and it works great. For loop setting I just used GIMP.

  14. May 3rd, 2011 at 10:02 | #14

    Having the same problem… can’t layer the frames. I’m on version 4.2. What version did you build the tutorial with?

  15. May 3rd, 2011 at 10:22 | #15

    @Timothy I don’t remember which version of OS X I was using when I wrote the tutorial. I’m on Snow Leopard now (Preview v5.0.3). Maybe it was introduced later. Which version of OS X has Preview 4.2? -Rob

  16. Jack
    June 5th, 2011 at 16:07 | #16

    Even though I have all the frames, when I go to save the image as a GIF, it saves only 1 frame (usually the first one selected when selecting all of them). Do I have to save all the screenshots as GIF’s?

  17. June 6th, 2011 at 12:41 | #17

    @Jack Assuming you’ve got a recent Preview app (from earlier comments, we haven’t quite worked out when the feature was introduced), it’s possible that Preview is simply showing you multiple images in one window such as when you select a bunch of JPEGs and open them at once. The last screenshot above shows what it ought to look like when you drag a subsequent frame onto the GIF. If that’s all good-to-go, then I’m sorry, but I’m not sure what’s broken. -Rob

  18. Kenny
    September 7th, 2011 at 19:43 | #18

    I’m having the same problem. I have the latest version, but it looks like our sidebars are a little different. My pictures are saved as .GIFs but their sidebars don’t have your icons on the bottom. Yours has a “six squares” icon, a “two dots” icon, a “three lines” icon, and a “pen” icon; mine shows a “gear” icon and a side scroll feature. I’m not sure why they’re different.

  19. November 22nd, 2011 at 05:28 | #19

    How would one modify this so that one could run an Automator script or an AppleScript to automatically both record and then combine this stuff on-the-fly?

  20. macadol
    January 15th, 2012 at 16:34 | #20

    Since Lion is the OS X running, Preview is not able to save as GIF. Only PDF, JPEG, JPEG2000, TIFF, PNG and EXR (I don’t know what is this one. Solutions?

  21. Jordon Jasper
    February 1st, 2012 at 21:09 | #21

    Is there any way to make them loop on preview?

  22. March 7th, 2012 at 13:09 | #22

    @macadol, by holding down the option key while clicking the drop down arrow for the save type options, you can get all the others including GIF format.. I tried for almost an hour on a 4.2(leopard) preview and had the same problem as @Lance, @Al, @George … but managed to do it on a Lion Preview.. Thanks for the tutorial!!

  23. Wayne
    April 2nd, 2012 at 09:55 | #23

    agree with @macadol, no GIF format. @Anteneh, are you sure you can do it on Lion Preview

  24. August 18th, 2012 at 12:01 | #24

    @mcadol and Wayne; Open Preview, Export, then press Option key and hold as you click the Format drop down list. Lots more choices, including gifs.

  25. August 18th, 2012 at 12:09 | #25

    Anteneh, if you’re still reading this, can you tell us what exactly you did on Lion after you got all your gifs into Preview? I’ve got that far, but I can’t save it. Thx!

  26. September 5th, 2012 at 03:48 | #26

    I just tried it and it plain works.
    Thank you for the trick.

  27. Ashok Maurya
    December 24th, 2012 at 07:53 | #27

    well, image sequencing on preview is not available in Mac Lion. Is there a way out?

  28. NYE2013
    January 6th, 2013 at 14:53 | #28

    Thanks Bay Sweetwater. But the guys at Apple sure are trying to make life as difficult as possible for their customers, hiding away more and more options that used to be in the open. Like the dock left button
    .

  29. March 12th, 2014 at 12:19 | #29

    Just use Quick Look vs. Preview to view your animation.

  30. Joshua See
    November 7th, 2014 at 12:25 | #30

    Open an existing GIF in Preview, duplicate it, then replace its contents with the to get around the save as GIF limitation. Works as of 10.9, Mavericks.

  31. December 12th, 2014 at 17:33 | #31

    Hello there, I believe your web site may be having web browser compatibility issues.
    Whenever I take a look at your blog in Safari, it looks fine however,
    if opening in Internet Explorer, it’s got some overlapping issues.

    I merely wanted to give you a quick heads up!
    Other than that, excellent site!

  1. October 20th, 2014 at 02:10 | #1