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);
Blurry Perspective
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Blurry Perspective
I have moved this to the Users forum.
The "blurry effect" in triangles at the top and bottom are from virtual pixels. Output pixels in these areas come from outside the input image. By default, pixels from the edge are used, hence the smearing effect. Set virtual pixels to black, or one of the other settings.
The "blurry effect" in triangles at the top and bottom are from virtual pixels. Output pixels in these areas come from outside the input image. By default, pixels from the edge are used, hence the smearing effect. Set virtual pixels to black, or one of the other settings.
snibgo's IM pages: im.snibgo.com