Page 1 of 1

How can set animated GIF's loop and unique color?

Posted: 2006-11-29T06:38:49-07:00
by gydoesit
Like http://www.cit.gu.edu.au/~anthony/graph ... im_basics/

I want to do following with PHP:
1. Set loop count.
2. Generate a single Global Color Table

Posted: 2006-11-29T07:11:51-07:00
by gydoesit
Hmm,

The "-unique-colors" operator in the above was added to IM version 6.2.8-8, and converts an image into a smaller image containing just one pixel per unique color in the original image. It isn't strictly needed for the above, but it does make things easier, and uses far less disk space.
Finally using any IM before v6.2.9 is likely to continue to add extra 'local' colormaps, as soon as you use one of the later colormap optimizations. The result is that the above colormap optimization will become useless. So if you plan GIF work, keep you IM up-to-date.

Now the magickwand for PHP is 6.2.4 so I use

MagickQuantizeImages($im,216,MW_RGBColorspace,0,true,false);
MagickMapImage($stackIm,$im,1);

But the GIF is big yet :shock: