As far as I know, the density of PNG files is measured not in pixels per inch, but in pixels per centimeter.
But then how is it possible that for some PNG files ImageMagick’s command
magick identify -format %xx%y-%U image.png
returns density that is measured in pixels per inches or in unspecified units (144x144-PixelsPerInch
, 72x72-Unspecified
), and not in pixels per centimeter (56.69x56.69-PixelsPerCentimeter
, 28.34x28.34-PixelsPerCentimeter
)?
Example images:
144x144-PixelsPerInch
: macos-shift-command-4-screenshot.png72x72-Unspecified
: image-from-wikipedia-page-about-the-png-format.png28.34x28.34-PixelsPerCentimeter
: pixels-per-centimeter.png