(PECL imagick 2, PECL imagick 3)
Imagick::waveImage — Applies wave filter to the image
$amplitude
, float $length
) : boolApplies a wave filter to the image. 此方法在Imagick基于ImageMagick 6.2.9以上版本编译时可用。
amplitude
The amplitude of the wave.
length
The length of the wave.
成功时返回 true
。
错误时抛出 ImagickException。
Example #1 WaveImage can be quite slow Imagick::waveImage()
<?php
function waveImage($imagePath, $amplitude, $length) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->waveImage($amplitude, $length);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>