5

I have a bunch of files labelled 1.png and so on. I'm using the following command line to produce a gif animation:

convert -delay 20 *.png animation.gif

But the frames get superposed sequentially. I did not expect this behavior, what might be wrong?

Thanks

user4157124
  • 2,809
  • 13
  • 27
  • 42
Alejandro D. Somoza
  • 391
  • 1
  • 3
  • 19
  • 2
    I have never seen that before - are your `PNG`s transparent maybe? – Mark Setchell Oct 07 '14 at 15:46
  • 1
    ASIDE: I suggest you rename your files 001.png 002.png, etc. That is with an appropriate number of leading zeros. Otherwise, 10.png may come before 2.png. They need to be ordered alphabetically, not numerically for the wild card *.png to work properly (if you have more than 1.png ... 9.png) – fmw42 May 22 '17 at 17:04

1 Answers1

13

Option -dispose previous:

convert -dispose previous -delay 20 *.png animation.gif
Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225