animate gif with transparency

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
nephish

animate gif with transparency

Post by nephish »

Hey there all,

i am using convert to animate a gif like this.
convert -delay 50 img1.gif img2.gif img3.gif -loop 0 rotate.gif

the individual images are a band that should rotate in the animation, the problem is, that when im2.gif shows up, img1.gif is still there. So the images display not like a motion, but images being stacked on top of each other.
how can i fix this?

the images all have transparency

thanks
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: animate gif with transparency

Post by anthony »

Use the right disposall setting. Default is to just overlay!

Say background or previous. either should work for this.

PS: use -layers Optimize before saving to to get IM to reduce the final animation size via frame optimizations, and better disposals.


For more information of dispose methods and techniques see
IM Examples, Animation Basics.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
nephish

Re: animate gif with transparency

Post by nephish »

Thank you very much, -dispose background worked like a champ .
Post Reply