Since I wrote this I have had the oppunity to work in the conversion of a short and small real-time video to GIF conversion...
http://www.imagemagick.org/Usage/video/
From this I have determined that IM does not currently automatically save using a common global color table, unless the images have a standard common colormap shared between them (using the
-map color reduction operation).
The
-colors quantization operator, as with most operators only reduces the colors of each image (frame) and not over the whole animation, and this is the default method used when saving to a GIF animation.
As to why my own 'moving hole' test animation ends up with a single global colortable... I have no idea, I designed it with multiple colors to try to force the use of local color maps, but obviously failed in my attempt.
If you realy want to force the use of a global color map, use the technique developed on the Animation Basics, Colormap optimization area
http://www.imagemagick.org/Usage/anim_b ... olortables
And again shown in the new "video to GIF" section.
Code: Select all
convert moving_hole.gif \
\( -clone 0--1 -background none -append -colors 64 \
-unique-colors -write mpr:colormap +delete \) \
-map mpr:colormap moving_hole_ctbls.gif
This appends all the frames together, then color quantizes it to a common 'best' colormap. This is then used to map all the colors of all the frames in the original animation to the same color tabel before saving.
WARNING: do not further modify the image data after this step or you will invalidate the optimization. Unless you want the modified frame to use a temporary seperate color map.
The video page uses a simpler version, as it does not have transparency to deal with. That will change if add transparency optimization features to IM, sometime in the future. A technique that should improve
-ordered-dither performance.