(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以上版本編譯時(shí)可用。
amplitude
The amplitude of the wave.
length
The length of the wave.
成功時(shí)返回 true
。
錯(cuò)誤時(shí)拋出 ImagickException。
示例 #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();
}
?>