HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelTutorial Source codeReport an issue

Extent image

← exportImagePixels   filter →
Comfortability method for setting image size. The method sets the image size and allows setting x,y coordinates where the new area begins. This method is available if Imagick has been compiled against ImageMagick version 6.3.1 or newer.
function extentImage($image_path)
    $imagick = new \Imagick(realpath($image_path));

    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();