file size in animation

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
jpgt
Posts: 1
Joined: 2012-10-08T07:45:37-07:00
Authentication code: 67789

file size in animation

Post by jpgt »

I am building animations from sets of .gif images (under winXP, using Imagemagick-6.7.9-9 Q16). Each frame (a mathematical curve evolving when a parameter changes) weighs about 5k. I use some 180 frames.
I am surprised to see that the file produced by convert is rather large (564 k). In contrast, the shareware Easy Gif Animator creates from the same data, a 12k final file.
In another case, with 534 individual frames, Easy Gif Animator crashes and Imagemagick creates a 3.4 M final file.
The Gimp does slightly better (3.2 M) but in black and white only.

Is there anything I can do to get smaller files ?

Thank you for your help anr time
JP Grivet
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: file size in animation

Post by fmw42 »

I am no expert on this. But my understanding is that IM uses very precise quantization methods and that may be slower and produce larger files than other systems. You might be able to reduce the time and quality by post processing with some other tool. see http://www.imagemagick.org/Usage/formats/#gif_non-im

Alternately, you can to some degree control the quality and speed using the -treedepth command. see
http://www.imagemagick.org/script/comma ... #treedepth
http://www.imagemagick.org/script/quantize.php
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: file size in animation

Post by anthony »

Mathematical images generate very different dither patterns whcih cause GIF files to become large.

try an ordered dither instead... See
Video handling for an example of using ordered dither.
http://www.imagemagick.org/Usage/video/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply