56

I have an animated gif which, as originally created, animates once then stops. I want to modify the image file so it loops forever instead.

What free applications or command-line utilities for Mac OS X can I use to do this? I've found several GIF utilities that can create new animations, but none that let me tweak the properties of existing ones.

Brant Bobby
  • 2,576

6 Answers6

56

You can use ImageMagick. You just run:

convert -delay 20 -loop 0 nonloopingImage.gif loopingImage.gif

You may need to install ImageMagick first.

If you use brew you can: brew install imagemagick from the terminal, then you can run the convert command.

aharris88
  • 661
  • 5
  • 5
35

Solution involving the Terminal:

  1. Download the sources of Gifsicle
  2. Unpack the sources and go to the unpacked directory
  3. Do ./configure --disable-gifview --disable-gifdiff
  4. Do make
  5. Do cd src
  6. And finally do ./gifsicle -bl /path/to/image.gif

Solutions using GUI tools (I didn't test any them!):

  1. You can try GifBuilder (requires Rosetta to work with Snow Leopard).
  2. Pixen also seems to be a GIF Editor.
Studer
  • 3,816
9

Assuming you already installed Homebrew and run brew install imagemagick.

Just use the command line to do:

convert -delay 15 -loop 0 input.gif output.gif

And this edits your existing image without modifying the existing durations:

mogrify -loop 0 Untitled.gif
9

GIMP can edit animated GIFs; open the image in that then save it again. You will be asked a few questions, and one of the available options is to loop forever.

It is apparently possible, or even easy, to install GIMP on OS X, but I can't say I've done it,

A N Other
  • 556
3

See Michael's Animated GIFs guide.

It describes the GIF Construction Set utility that can display the internal structure of the animated GIF (unfortunately not for OS X). Especially of interest is:

The LOOP control specifies how many times the series of images will be presented. While many animated GIFs are on infinite loop, this can be distracting to the user. This 'noframes' GIF cycles 5 times.

image

It's harder to find free OS X utilities for editing GIF files, especially since I'm not a Mac user. One that seems to fit the bill is Gifsicle, which can set the loop through the "loopcount" parameter.

Gareth
  • 19,080
harrymc
  • 498,455
2

If you came here for making this change on a PC like I did, GIMP is a great option. A N Other's response is a good one-- here are some specifics to add to their answer.

  1. Open your animated gif in GIMP
  2. Click File > Export As... optionally change the name and click "Export"
  3. Select "As Animation", then check the box "Loop Forever". Click "Export" again

The nice thing about GIMP compared to the other options above is you don't have to write any code or commands-- it's all built in and free. Hope this helps!

Jakuje
  • 10,827