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

Imagick::flopImage

PHP function Edit on GitHub ✎

(PECL imagick 2, PECL imagick 3)

Creates a horizontal mirror image

Description

Imagick::flopImage(): bool

Creates a horizontal mirror image by reflecting the pixels around the central y-axis.

Parameters Parameters

Return Values

Success

Errors/Exceptions

Throws

Examples

Imagick::flopImage()

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

?>

See Also

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