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/jpg");
    echo $imagick->getImageBlob();
}