Imagick::swirlImage

(PECL imagick 2, PECL imagick 3)

Imagick::swirlImageSwirls the pixels about the center of the image

說(shuō)明

Imagick::swirlImage(float $degrees): bool

Swirls the pixels about the center of the image, where degrees indicates the sweep of the arc through which each pixel is moved. You get a more dramatic effect as the degrees move from 1 to 360.

參數(shù)

degrees

返回值

成功時(shí)返回 true。

錯(cuò)誤/異常

錯(cuò)誤時(shí)拋出 ImagickException。

范例

示例 #1 Imagick::swirlImage()

<?php
function swirlImage($imagePath$swirl) {
    
$imagick = new \Imagick(realpath($imagePath));
    
$imagick->swirlImage($swirl);
    
header("Content-Type: image/jpg");
    echo 
$imagick->getImageBlob();
}

?>