(PECL imagick 2.0.0)
Imagick::vignetteImage — Adds vignette filter to the image
$blackPoint
, float $whitePoint
, int $x
, int $y
) : boolSoftens the edges of the image in vignette style. Această metodă este disponibilă dacă Imagick a fost compilat cu ImageMagick de versiunea 6.2.9 sau ulterior.
blackPointThe black point.
whitePointThe white point
xX offset of the ellipse
yY offset of the ellipse
Întoarce TRUE în caz de succes.
Example #1 Imagick::vignetteImage()
<?php
function vignetteImage($imagePath, $blackPoint, $whitePoint, $x, $y) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->vignetteImage($blackPoint, $whitePoint, $x, $y);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>