PHPKonf ─░stanbul PHP Conference 2015

Imagick::getImageWidth

(PECL imagick 2.0.0)

Imagick::getImageWidthRetourne la largeur de l'image

Description

int Imagick::getImageWidth ( void )

Retourne la largeur de l'image.

Valeurs de retour

Retourne la largeur de l'image.

Erreurs / Exceptions

Lance une exception ImagickException si une erreur survient.

add a note add a note

User Contributed Notes 2 notes

up
0
bob at majdak dot net
2 months ago
I am noticing that this is returning the original size of the image when it was opened, and not the size it may have been resized to with scaleImage or resizeImage.
up
0
terry
1 year ago
<?php

$image
= new Imagick("picture.jpg");
$width = $image->getImageWidth();
print
"the image width is " . $width . " pixels";

?>

Will print:
the image width is 200 pixels
To Top