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

Imagick::flipImage

PHP function Edit on GitHub ✎

(PECL imagick 2, PECL imagick 3)

Creates a vertical mirror image

Description

Imagick::flipImage(): bool

Creates a vertical mirror image by reflecting the pixels around the central x-axis.

Parameters Parameters

Return Values

Success

Errors/Exceptions

Throws

Examples

Imagick::flipImage()

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

?>

See Also

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