I'm working on a web application and I need with PHP to distort and tile an image, just as :
http://www.imagemagick.org/Usage/distorts/#horizon
But with a small process time, I need to render with interpolated lookup or super sampling x3 ou 4, as :
http://www.imagemagick.org/Usage/distor ... a_vs_super
I can do this with inline command (convert ... -virtual-pixel tile -filter point -set option:distort:scale 3 -distort perspective ...), but I found nowhere how do to with IMagick !
My code :
Code: Select all
$echant=new Imagick();
$echant->readImage('texture.jpg');
$echant->resizeImage(800,600,Imagick::FILTER_CATROM,1);
$echant->setImageVirtualPixelMethod(Imagick::VIRTUALPIXELMETHOD_TILE);
$echant->setImageMatte(true);
$echant->setImageMatteColor('black');
$echant->setImageFormat('png');
$echant->distortImage(Imagick::DISTORTION_PERSPECTIVE, array( 0,0, 2,285, 354,0, 161,266, 354,532, 347,474, 0,532, 15,528 ), false);
Help needed and greatly appreciated ! Thank in advance.
Indy.