mogrify resolution of png image: error when using PixelsPerInch unit

geo cherchetout <[email protected]>
Newsgroups gmane.comp.video.image-magick.user
Message-ID <[email protected]>
Hello all,

When I use mogrify to set the resolution in PixelsPerInch of an png image,
the numbers are set but the unit is PixelsPerCentimeter.

$ mogrify -density 200x200 -units PixelsPerInch image.png
$ identify -verbose image.png | grep -A 1 Resolution
  Resolution: 199.99x199.99
  Units: PixelsPerCentimeter

$ mogrify -density 75x75 -units PixelsPerCentimeter image.png
$ identify -verbose image.png | grep -A 1 Resolution
  Resolution: 75x75
  Units: PixelsPerCentimeter

$ mogrify -density 150x150 -units PixelsPerInch image.png
$ identify -verbose image.png | grep -A 1 Resolution
  Resolution: 149.99x149.99
  Units: PixelsPerCentimeter

Without specifying unit, default unit seems to be PixelsPerCentimeter, not
PixelsPerInch as in the documentation

$ mogrify -density 200x200 image.png
$ identify -verbose image.png | grep -A 1 Resolution
  Resolution: 200x200
  Units: PixelsPerCentimeter

It is not identify that is wrong, Gimp always confirms it's values.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.