HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Flip image

← flattenImages   floodFillPaintImage →
Creates a vertical mirror image by reflecting the pixels around the central x-axis.

Example

function flipImage($image_path)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->flipImage();
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}