15

When I try to make a gif with two frames both of which have a transparent background in GIMP, what happens is that the first frame looks OK, then the second frame appears on top of it, such that you can see both frames at the same time.

How can I make animated gif in which all of the frames have a transparent background but each time a frame appears, the previous frame disappears completely ?

3 Answers 3

14

When exporting/saving (depends on version) your work as GIF, you have several options for it. One way for that, what you probably want, could be done by choosing from "Frame disposal where unspecified" option "One frame per layer (replace)".

1
  • 1
    I also had to make sure that I checked off "Use disposal entered above for all frames" -- I think because by default every layer had the "(combine)" on it.
    – Hannele
    Commented Feb 28, 2019 at 20:30
12

For the current version (2.8.0), in the name for each frame layer, include (replace). For example:

frame 1(250ms)(replace)

That will tell gimp to replace instead of stacking. Note that you can use the stacking for some pretty cool effects as well.

1

Others answers involving gimp did not work for me. What fixed my gif is the command

gifsicle -U --disposal=previous -O2 source.gif > target.gif

6
  • Both other answers are valid though.
    – xenoid
    Commented Nov 11, 2018 at 20:17
  • 1
    hence the "for me". I used gimp osx version, maybe it is related.
    – kraymer
    Commented Nov 12, 2018 at 5:36
  • Certainly not... You must have missed something.
    – xenoid
    Commented Nov 12, 2018 at 7:29
  • 1
    I also had to make sure that I checked off "Use disposal entered above for all frames"
    – Hannele
    Commented Feb 28, 2019 at 20:30
  • 1
    I tried and It didn't work, but then I tried re-stitching my gif from the frames from scratch gifsicle --loop --delay=2 --disposal=previous *.gif > c3.gif which is essentially the same thing, and it worked! Thanks so much @kraymer for the help!
    – cmarangu
    Commented Aug 17, 2022 at 5:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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