PixelsPerCentimeter is on by default

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
aegion

PixelsPerCentimeter is on by default

Post by aegion »

PixelsPerCentimeter seems to be on by default, contrary to the documentation:

Code: Select all

mogrify -resample 100x100 -format jpg *.png
creates 254 dpi images, while

Code: Select all

mogrify -units PixelsPerInch -resample 100x100 -format jpg *.png
works as expected.

(Tested with ImageMagick-6.4.2-4-Q16-windows-dll on Windows XP SP3.)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: PixelsPerCentimeter is on by default

Post by magick »

The PNG format does not support pixels per inch, only pixels per centimeter.
aegion

Re: PixelsPerCentimeter is on by default

Post by aegion »

What difference should it make for me how the resolution is stored internally? (In pixels per meter, by the way.) Imagemagick is capable of converting between resolution units, so it shouldn't matter.

Anyway, the implementation disagrees with the documentation, which means one of them has a bug. It's your choice which one. :lol:
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: PixelsPerCentimeter is on by default

Post by magick »

Ok, we can't reproduce the problem. We're using ImageMagick 6.4.2-4 and it returns the expected resolution of 100 x 100 for both of your commands.
Post Reply