Page 1 of 1

Posted: 2006-08-05T16:40:02-07:00
by el_supremo
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

Posted: 2006-08-05T17:07:54-07:00
by magick
Use MagickSetImagePage() and set the offsets to 0. This resets the virtual canvas. Although MagickSetImageExtent() may work, MagickSetImagePage() is better suited to reset the virtual canvas.

Posted: 2006-08-05T21:57:34-07:00
by el_supremo
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