Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
    
Bear in mind that it also depends on the application you are using to display the animated GIF. For example, Firefox's display of animated GIFs can be changed through <code>about:config</code>: <code>image.animation_mode = normal | once | none</code> – Mike Fitzpatrick Jul 1 '10 at 23:56
1  
do you want it to loop permenantly, so that you will change the file? Or do you want to change a setting locally on your computer to make this work? – Daisetsu Jul 1 '10 at 23:59
    
I want to modify the file, not the app displaying it. I'll edit the question to clarify. – Brant Bobby Jul 2 '10 at 15:15
    
Related: Make a GIF 'video'. – kenorb Dec 25 '15 at 20:13
up vote 18 down vote accepted
+50

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.
share|improve this answer
1  
Gifsicle is definitely the tool for the job. I found it so useful I build a install pkg with binaries for easy deployment, no XCode required. dept.psych.columbia.edu/~peter/gifsicle – notpeter Dec 15 '11 at 7:18
    
@notpeter How do you use this once you've installed it? – Ashley Ward Aug 17 '12 at 23:32
    
to expand on your answer, here's what worked for me: first install with Homebrew like a boss: brew install gifsicle then make the loop: gifsicle -l non_looping.gif > looping.gif – Michael Sep 12 '14 at 14:03
    
Thanks Michael, your suggestion works great (brew install gifsicle then make the loop: gifsicle -l non_looping.gif > looping.gif) – Erwin Coumans Aug 1 '15 at 21:06

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.

share|improve this answer
3  
Not preinstalled on mine, a 2014 MBP running OS 10.11. Had to brew install imagemagick. – jasonszhao Oct 12 '15 at 3:39

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,

share|improve this answer

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.

share|improve this answer

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
share|improve this answer

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.