HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelTutorial Source codeReport an issue
Category
Example

Get image geometry

← getImageCompression   getImageHistogram →
Returns the width and height as an associative array.

The values of getImageGeometry for the image below are:
width - 500
height - 400
$imagick = new \Imagick(realpath($this->imageControl->getImagePath()));
foreach ($imagick->getImageGeometry() as $key => $value) {
    $text .= "$key - $value\n";
}