I think I've found the solution to this problem.
After MagickCropImage add:
MagickSetImageExtent($mgck_wnd, $w, $h)
where $w,$h are the dimensions used in the crop.
The GIF header specifies a width and height of a logical screen on which the image(s) in the file will be displayed and this logical screen size isn't altered when you crop an image. Setting the imageextent forces it to change.
Best Wishes
Pete
Possible BUG cropping GIF files
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
I was using Rexx when I was doing the testing so I don't know if those two functions are implemented in PHP but both are definitely in MagickWand. MagickSetImagePage is documented here:
http://studio.imagemagick.org/api/magic ... tImagePage
Pete
http://studio.imagemagick.org/api/magic ... tImagePage
Pete