Imagick::getImageGeometry

(PECL imagick 2.0.0)

Imagick::getImageGeometryGets the width and height as an associative array

说锟斤拷

Imagick::getImageGeometry ( void ) : array

Returns the width and height as an associative array.

锟斤拷锟斤拷值

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

锟斤拷锟斤拷锟届常

锟斤拷锟斤拷时锟阶筹拷 ImagickException锟斤拷

锟斤拷锟斤拷

Example #1 Imagick::getImageGeometry()

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

?>