-coalesce

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Marcel71
Posts: 49
Joined: 2011-04-13T13:57:34-07:00
Authentication code: 8675308

-coalesce

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: -coalesce

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply