Older ImageMagick solutions often suggest using -units PixelsPerInch
when changing the density of a PNG image, that is, for example, -units PixelsPerInch -density 300
, and not just -density 300
.
But in modern ImageMagick (7.1.1-33), according to the following tests, -units PixelsPerInch
seems to be no longer needed for this. Is it really so or I misunderstood something?
magick identify -format %xx%y a.png => 72x72
magick identify -units PixelsPerInch -format %xx%y a.png => 72x72
magick a.png -density 300 a1.png
magick a.png -units PixelsPerInch -density 300 a2.png
magick identify -format %xx%y a1.png => 300x300
magick identify -units PixelsPerInch -format %xx%y a1.png => 300x300
magick identify -format %xx%y a2.png => 300x300
magick identify -units PixelsPerInch -format %xx%y a2.png => 300x300