ImageMagick and transparent background for animated gif

imagemagick

I have an animation as a batch of .png files (100 files). The background is transparent in the source .png files. I want to convert them into a single animated gif. I have tried this command:

convert -delay 0 -loop 0 -alpha set *.png ani.gif

But the result is the following (green is the HTML page background):

enter image description here

How should I remove the previous frames from an every following one?

Best Answer

I've found -dispose previous.

UPDATE

OK, convert -delay 0 -loop 0 -alpha set -dispose previous *.png ani.gif

Related Topic