Imagick::getImageGeometry

(PECL imagick 2.0.0)
Gets the width and height as an associative array
array Imagick::getImageGeometry ( void )

Returns the width and height as an associative array.

Returns:

Returns an array with the width/height of the image.

Exception:

Throws ImagickException on error.

Examples:
Imagick::getImageGeometry()
<?php
function getImageGeometry($imagePath) {
    $imagick = new \Imagick(realpath($imagePath));
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}

?>

doc_php
2016-02-24 16:01:01
Comments
Leave a Comment

Please login to continue.