Topic: php-pecl-imagick getImageResolution returns 0's
Not sure at what update this started occurring, or if it is in the php rpm or ImageMagick-last-libs but when using getImageResolution on an image instead of getting back the parameters expected we get 0's returned.
Centos6.5
ImageMagick-last-libs-6.8.7.4-1.el6.remi.x86_64
php-pecl-imagick-3.1.2-2.el6.remi.5.4.x86_64
<?php
$path="/path_to_image";
$img= new imagick($path);
print "Geometry ";
print_r($img->getImageGeometry());
print "Resolution ";
print_r($img->getImageResolution());
?>
Geometry Array
(
[width] => 320
[height] => 480
)
Resolution Array
(
[x] => 0
[y] => 0
)
If I remove php-pecl-imagick and install ImageMagick-devel from centos repo then install imagick from pecl i get expected behavior.
ImageMagick-devel-6.5.4.7-6.el6_2.x86_64
Geometry Array
(
[width] => 240
[height] => 170
)
Resolution Array
(
[x] => 28.35
[y] => 28.35
)