php8.5
Home/ Manual/ imagick / imagick/ Imagick::waveImage

Imagick::waveImage

PHP function Edit on GitHub ✎

(PECL imagick 2, PECL imagick 3)

Applies wave filter to the image

Description

Imagick::waveImage(float $amplitude, float $length): bool

Applies a wave filter to the image. 0x629

Parameters

amplitude

The amplitude of the wave.

length

The length of the wave.

Return Values

Success

Errors/Exceptions

Throws

Examples

WaveImage can be quite slow Imagick::waveImage()

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

?>

See Also

Source: reference/imagick/imagick/waveimage.xml · from the official PHP manual (php/doc-en)