How to get Image DPI in PixelPerInches
Posted: 2019-01-08T06:23:04-07:00
Hello Team,
Can anyone please let me know how can I get the image resolution (DPI) with the units also for the PNG / BMP images?
I am using the below command but it is giving me DPI in PixelPerCentimeter and I need the unit in PixelPerInches.
exec("identify -format '%x' -units 'PixelsPerInch' jeanrightleg.png")
It was working for ImageMagick 6.7 but when I upgraded the ImageMagick version to 7.0.8 then it is not works as expected.
I am using CentOS 7.6
ImageMagick 7.0.8
Below is the image URL.
https://www.dropbox.com/s/0jga5x4d9qcaa ... g.png?dl=0
Thanks in advanced.
Can anyone please let me know how can I get the image resolution (DPI) with the units also for the PNG / BMP images?
I am using the below command but it is giving me DPI in PixelPerCentimeter and I need the unit in PixelPerInches.
exec("identify -format '%x' -units 'PixelsPerInch' jeanrightleg.png")
It was working for ImageMagick 6.7 but when I upgraded the ImageMagick version to 7.0.8 then it is not works as expected.
I am using CentOS 7.6
ImageMagick 7.0.8
Below is the image URL.
https://www.dropbox.com/s/0jga5x4d9qcaa ... g.png?dl=0
Thanks in advanced.