Code: Select all
$image->Distort( "method" => "Perspective",
"points" => [ 0,0 => 0,0, 100, 0 => 100,0, 0,100 => 0,100, 100,100 => 100,100 ],
"best-fit" => 1,
);
At least for me and my IM 6.5.1.0
Cheers,
Searle
Code: Select all
$image->Distort( "method" => "Perspective",
"points" => [ 0,0 => 0,0, 100, 0 => 100,0, 0,100 => 0,100, 100,100 => 100,100 ],
"best-fit" => 1,
);
With bestfit it will be displaced by 1 pixel, but it will also be enlarged by 2 pixels and and a -1,-1 canvas offset.Searle wrote:If I understand correctly, the following should be a NOP:But it's not, the image is displaced by [1,1], no matter what "points" is.Code: Select all
$image->Distort( "method" => "Perspective", "points" => [ 0,0 => 0,0, 100, 0 => 100,0, 0,100 => 0,100, 100,100 => 100,100 ], "best-fit" => 1, );
At least for me and my IM 6.5.1.0
You didn't turn on 'best-fit' or 'layered image' flag using +distort, so you did not see it.fmw42 wrote: Seems to work fine for me in IM 6.5.2-9 Q16
Depend on what you are doing with the image, and why you are distorting it.Searle wrote:Ok, thanks! I understood the extra pixel, and if placing the image at [-1,-1] works by definition,
thats fine for me.
But just for curiosity: how do I switch off layered-image in PerlMagick?
Cheers,
Searle