php教程

Imagick::vignetteImage

(PECL imagick 2.0.0)

Imagick::vignetteImageAdds vignette filter to the image

说明

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

Softens the edges of the image in vignette style. 此方法在Imagick基于ImageMagick 6.2.9以上版本编译时可用。

参数

blackPoint

The black point.

whitePoint

The white point

x

X offset of the ellipse

y

Y offset of the ellipse

返回值

成功时返回 TRUE

参见

范例

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

?>

User Contributed Notes

There are no user contributed notes for this page.

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788