HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Imagick::pingImage

← paintOpaqueImage   pingImageBlob →
This method can be used to query image width, height, size, and format without reading the whole image in to memory.

This method can be used to query image width, height, size, and format without reading the whole image in to memory.


For file: Biter_500.jpg

Width is 500
Height is 400

Example

$image = new \Imagick();
$image->pingImage(realpath($this->imageControl->getImagePath()));
$output .= "For file: " . basename($this->imageControl->getImagePath()) . " <br/><br/>";
$output .= "Width is " . $image->getImageWidth() . "<br/>";
$output .= "Height is " . $image->getImageHeight() . "<br/>";