Blurry Perspective
Posted: 2017-02-08T01:52:38-07:00
Hi,
I have a problem with DISTORTION_PERSPECTIVE for some images I got blurry efect like here:
http://nkontent.pl/imagick/pic.jpg
I tried many different ways to avoid this bug, but still same issue.
Maybe Im doing something wrong?
My code is:
$h = $img->getImageHeight();
$w = $img->getImageWidth();
$img->setImageMatte(true);
$r = 0;
$pers = 20;
$k = $w * $pers * 0.01;
$controlPoints = array(
0, 0, 0, 0,
0, $h, 0, $h,
$w, $r, $w, $k,
$w, $h, $w, $h - $k);
$img->distortImage(Imagick::DISTORTION_PERSPECTIVE, $controlPoints, true);
I have a problem with DISTORTION_PERSPECTIVE for some images I got blurry efect like here:
http://nkontent.pl/imagick/pic.jpg
I tried many different ways to avoid this bug, but still same issue.
Maybe Im doing something wrong?
My code is:
$h = $img->getImageHeight();
$w = $img->getImageWidth();
$img->setImageMatte(true);
$r = 0;
$pers = 20;
$k = $w * $pers * 0.01;
$controlPoints = array(
0, 0, 0, 0,
0, $h, 0, $h,
$w, $r, $w, $k,
$w, $h, $w, $h - $k);
$img->distortImage(Imagick::DISTORTION_PERSPECTIVE, $controlPoints, true);