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
Imagick Result
What is wrong with my code?
Different results between Imagick and ImageMagick.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Different results between Imagick and ImageMagick.
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
Otherwise, post this to the IMagick forum viewforum.php?f=18