HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelTutorial Source codeReport an issue
Category
Example

Flip image

← flattenImages   floodFillPaintImage →
Creates a vertical mirror image by reflecting the pixels around the central x-axis.
function flipImage($image_path)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->flipImage();
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}