convert destroys animated gif

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
double
Posts: 14
Joined: 2009-10-25T10:12:06-07:00
Authentication code: 8675309

convert destroys animated gif

Post by double »

Hello,

If we convert an animated gif, the result is destroyed.

Souce file:
http://www.doppelbauer.name/test.gif

Code: Select all

convert test.gif -channel rgba -alpha on -trim +repage result.gif
Thank you very much
Markus
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert destroys animated gif

Post by fmw42 »

i am no expert on animations, but each frame of your gif is likely a different size. you will need to use -coalesce to separate frames to the same size, process them and then optimize them back into an animated gif. try

convert test.gif -coalesce -trim +repage -layers optimizeframe test2.gif

you may get an error message, but the image seems to work. IM 6.5.7-4 Q16

search the forum for similar recent posts. that was discussed not too long ago.

see
http://www.imagemagick.org/Usage/anim_basics/
http://www.imagemagick.org/Usage/anim_opt/
http://www.imagemagick.org/Usage/anim_mods/
double
Posts: 14
Joined: 2009-10-25T10:12:06-07:00
Authentication code: 8675309

Re: convert destroys animated gif

Post by double »

Juhu!
Thank you very much it works!
Marcus
Post Reply