Practical use to get the dimensions of the image:
<?php
$image = new Imagick($image_src);
$d = $image->getImageGeometry();
$w = $d['width'];
$h = $d['height'];
?>
(PECL imagick 2, PECL imagick 3)
Imagick::getImageSize — Devuelve el tamaño de la imagen en bytes
Esta función está DEPRECADA a partir de Imagick 3.4.4. Depender de esta funcionalidad está fuertemente desaconsejado.
Devuelve el tamaño de la imagen en bytes. Este método está deprecado en favor del método Imagick::getImageLength()
Esta función no contiene ningún parámetro.
Devuelve un entero que representa el tamaño de la imagen en bytes.
Practical use to get the dimensions of the image:
<?php
$image = new Imagick($image_src);
$d = $image->getImageGeometry();
$w = $d['width'];
$h = $d['height'];
?>
Try Imagick::getSize, Imagick::getImageWidth, or Imagick::getImageHeight if you are looking to get dimensions in pixels (rows, columns) of the current image.
If you get an error or warning (when using strict settings for PHP), telling you, that this function should not be used anymore try getImageLength() instead ...
If you're planning to stream imagick images via http, pay attention that this function may return the uncompressed image size, so it's not directly suitable for setting the content-length http header.
/* get the size of the image in bytes */
$image=new Imagick("c:/htdocs/rose.jpg");
$size=$image->getImageSize();
print "the size of the picture is ".$size." bytes";
result
the size of the picture is 3461 bytes