Page 1 of 1

Different results between Imagick and ImageMagick.

Posted: 2009-07-28T00:06:47-07:00
by sabater_wb
Hello.
Something wrong is happening when running the following codes:

exec("D:/magick/convert $foto -distort Perspective \"0,0,$ax,$ay 0,$minheight,$bx,$by $minwidth,0,$cx,$cy $minwidth,$minheight,$dx,$nem \" testa2.jpg");

------------------------------

$controlPoints = array(0,0,$ax,$ay, 0,$minheight,$bx,$by, $minwidth,0,$cx,$cy, $minwidth,$minheight,$dx,$nem);

$im = new Imagick($foto);
$im->setImageMatte(true);
$im->distortImage(Imagick::DISTORTION_PERSPECTIVEPROJECTION, $controlPoints, true);

$im->writeImage("testa.jpg");
$im->destroy();

I thing that the result should be the same, but it isn't.
Take a look.

ImageMagick
Image

Imagick Result
Image

What is wrong with my code?

Re: Different results between Imagick and ImageMagick.

Posted: 2009-07-28T11:28:22-07:00
by fmw42
I don't know if this is relevant, but some time ago, command line IM changed the ordering of the control points. Perhaps IMagick did not conform or you are using two different versions of IM. see http://www.imagemagick.org/Usage/distor ... rol_points. see also the comment about image coordinates vs pixel coordinates. Perhaps you are getting one of each.

Otherwise, post this to the IMagick forum viewforum.php?f=18