Imagick::vignetteImage

(PECL imagick 2, PECL imagick 3)

Imagick::vignetteImageAdds vignette filter to the image

Description

public Imagick::vignetteImage ( float $blackPoint , float $whitePoint , int $x , int $y ) : bool

Softens the edges of the image in vignette style. This method is available if Imagick has been compiled against ImageMagick version 6.2.9 or newer.

Parameters

blackPoint

The black point.

whitePoint

The white point

x

X offset of the ellipse

y

Y offset of the ellipse

Return Values

Returns true on success.

See Also

Examples

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();
}

?>

© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/imagick.vignetteimage.php