downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Imagick::getImageGravity> <Imagick::getImageGamma
[edit] Last updated: Fri, 24 May 2013

view this page in

Imagick::getImageGeometry

(PECL imagick 2.0.0)

Imagick::getImageGeometryLit les dimensions de l'image dans un tableau

Description

array Imagick::getImageGeometry ( void )

Retourne la largeur et la hauteur de l'image sous forme de tableau associatif.

Valeurs de retour

Retourne un tableau avec les dimensions de l'image.

Erreurs / Exceptions

Lance une exception ImagickException si une erreur survient.



add a note add a note User Contributed Notes Imagick::getImageGeometry - [2 notes]
up
0
benkuhl at gmail dot com
5 months ago
Because this method returns points, you can easily convert to a decimal representation of inches by dividing by 72.

<?php
$image
= new imagick($filename);

$geo = $image->getImageGeometry();

$sizex = $geo['width']; //1089
$sizey = $geo['height']; //396

echo round($sizex / 72, 2); //15.13 inches
echo round($sizey / 72, 2); //5.5 inches
?>
up
0
tim at provu dot co dot uk
4 years ago
Example code:

<?php
$image
= new imagick($filename);

$geo=$image->getImageGeometry();
 
$sizex=$geo['width'];
$sizey=$geo['height'];
?>

 
show source | credits | sitemap | contact | advertising | mirror sites