Image size while using -coalesce

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
djrulz
Posts: 3
Joined: 2011-09-09T02:53:48-07:00
Authentication code: 8675308

Image size while using -coalesce

Post by djrulz »

Hi,

I started to use IM just from yesterday, for converting my flash into animated GIF.
I use -coalesce to do that.
I export flash movie as BMP sequence and then use -coalesce.
What my problem in here is that I need the file size to be less than 1mb, since I'm using these animated GIF's in HTML mailer.
Is there any option to reduce the output file size?
Or is any other way around to make a animated GIF from flash.

PS: I tried exporting my flash in other sequence well (JPG, PNG, GIF), but found that BMP sequence to GIF gives me lower file size than other.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image size while using -coalesce

Post by fmw42 »

use -colors to reduce the number of colors

or

use -remap to make all the images have the same colormap (with less than 256 colors)

see
http://www.imagemagick.org/script/comma ... php#colors
http://www.imagemagick.org/script/comma ... .php#remap
http://www.imagemagick.org/Usage/quantize/#remap
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Image size while using -coalesce

Post by anthony »

coalesce converts the image into a full image for every frame with no GIF optimization to reduce its size. As such using coalesce is essentually generating the LARGEST GIF ANIMATION posible, with only basic GIF data compression being used.

Before saving to GIF try -layers Optimize.

As a quick guide to methods of animation optimization see Video to GIF Optimization
http://www.imagemagick.org/Usage/video/

But for details of optization of GIF animations see
http://www.imagemagick.org/Usage/anim_opt/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
djrulz
Posts: 3
Joined: 2011-09-09T02:53:48-07:00
Authentication code: 8675308

Re: Image size while using -coalesce

Post by djrulz »

Thanks for the reply and info..
I used the -remap method and found that it reduced the file size but color quality is diminished.

And i'm just gonna look into the Video Handling guide ..

Thanks again.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image size while using -coalesce

Post by fmw42 »

try Anthony's suggestion of optimizing the result.
Before saving to GIF try -layers Optimize.
djrulz
Posts: 3
Joined: 2011-09-09T02:53:48-07:00
Authentication code: 8675308

Re: Image size while using -coalesce

Post by djrulz »

Hi,
I tried the optimize method and it worked fine.. :D
Thanks a lot guys.
Dj
Post Reply