Page 1 of 1

-coalesce

Posted: 2011-07-04T02:24:11-07:00
by Marcel71
Hi IM team,

I have a question if it is possible that the -coalesce is being optimized.
When i have a large gif (for example 100 frames) i do the following command:

Code: Select all

convert large_img.gif -coalesce out_large.gif
It will take 34 seconds to complete.

When i use gifsicle

Code: Select all

gifsicle --unoptimize < large_img.gif > out_large2.gif
It will take almost 2 seconds...

Both output files are around 11MB.

Re: -coalesce

Posted: 2011-07-09T18:11:59-07:00
by anthony
The difference is that Imagemagick is a general image processor. It has to do a lot of extra work to deal with all types of images, not just GIF. As such it can not be optimized specifically for GIF as gifsicle is.

However I know from personal experience that gifsicle is limited in its handling of some GIF animations,
especially ones already optimized. for example gifsicle for me failed with some background disposal animations.

IM provides another option, one with more control only. Use what you feel is best.
IM Examples wrote: IM, Gifsicle and InterGIF, all provide such coalescing options to remove their own optimizations, though I cannot guarantee the non-IM applications will coalesce ALL animations correctly. IM will.