How to get transparency GIF image real width?

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
MGSteve

Re: How to get transparency GIF image real width?

Post by MGSteve »

My guess is that they're not all the same width due to GIF optimisations used in compression.

Try looking at MagickWriteImages() this appears to offer the functionality you're trying to build. Just create a temp folder and save the frames to that folder and then do whatever you need to do with the frames.

Otherwise you'll need to look how the frames are built up to form the image. GIF Frames can use a whole range of operations to save bandwidth, e.g not clearing out the previous frame and only settings pixels that have changed etc..

Hopefully MagickWriteImages() will do it all for you... (We can but hope!) Otherwise it appears you'll need to build the equivalent of a GIF Renderer!
Post Reply