getImageHeight() with a gif

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
ab18556

getImageHeight() with a gif

Post by ab18556 »

Hi,

i'm trying to setup a script able to crop a banner to a predifined ratio and everything is working fine with jpegs but when I try it with a gif, it's returning the wrong Height. My gif is a 5 frames animated one with a plain gray background and a black number in the middle of it. getImageHeight() seems to be oddly returning the height of the number insted of the height of the gif. Since my background is plain, 'm wondering if it may have something to do with transparency.

Thank You,
Patrick H.
ab18556

Re: getImageHeight() with a gif

Post by ab18556 »

well i figured out how to get the height and witdth of a gif by flattening an instance of it, but now i'm stuck with an other problem... When I try to crop the gif, it don't work... i'd cropping each frames 1 by 1 but the canvas won't crop so now i have a white background surrounding my cropped gif. Is there a way to also crop the canvas?
Post Reply