There was a really old (2011) thread on ImageMagick forum (see here), in which it was implicitly stated, if I understand correctly, that if processing PNG files (because the density of PNG images is stored as “pixels per centimeter” instead of “pixels per inch”), -units PixelsPerInch
should be specified before any other options.
That is, instead of, for example
magick input.png -density 300 -units pixelsperinch output.png
or
magick input.png -resample 300 -units PixelsPerInch output.png
one should use
magick -units PixelsPerInch input.png -density 300 output.png
or
magick -units PixelsPerInch input.png -resample 300 output.png
But I haven’t noticed any difference. Is it still relevant to modern ImageMagick?
I also tried
magick input.png -units pixelsperinch -density 300 output.png
and
magick input.png -units PixelsPerInch -resample 300 output.png
but haven’t noticed any difference, compared to the first and second examples, as well.
magick --version:
ImageMagick 7.1.1-33 Q16-HDRI aarch64 22263
jsx is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.