magick wrote:
We added MagickResetImagePage() to replicate the functionality of the -repage option. It will be available in ImageMagick 6.3.3 Beta and MagickWandForPHP 1.0.2 Beta tommorrow.
Ok, I finally decided to recompile my environment and get the latest stable code.
I can't really say I understand how to use it.
This:
Code: Select all
MagickCropImage($this->wand, $width, $height, $xOffset, $yOffset);
MagickResetImagePage($this->wand, $width.'x'.$height.'+'.$xOffset.'+'.$yOffset);
(no mather what the second argument is I get the same result, the only difference being that the 'Image' property is set to whatever the second argument is set to)
Still has the 'Page Geometry' property different than the 'Geometry' property. While (cliConvert just being a wrapper function that handles file-operations):
Code: Select all
MagickCropImage($this->wand, $width, $height, $xOffset, $yOffset);
$this->cliConvert('convert +repage %1$s %1$s');
Actually repages the image so that 'Geometry' == 'Page Geometry'.
Maybe a bug or maybe I'm using it wrong, no idea, and hard to find out since it isn't documented.
Now looking at the code it seems the only thing happening is that 'MagickSetImageFilename' is invoked in different ways depending on if there is a second argument or not, seems strange.
/tsr
ps. the reason why I decided to try out this approach (using MagickResetImagePage) is that I'm having trouble passing around the wand resources and also prefer to use one interface rather than 2.