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

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
gydoesit

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

Post 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
gydoesit

Post 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:
Post Reply