Main Menu

PNG Resolution

Started by Chris S, March 20, 2023, 07:29:55 PM

Previous topic - Next topic

Chris S

Any chance PNG resolution could be reported with -XResolution and -YResolution like most other common image formats, or do we just use -MacOS:MDItemResolutionHeightDPI and -MacOS:MDItemResolutionWidthDPI instead for PNGs?

Phil Harvey

PNG uses PixelsPerUnitX and PixelsPerUnitY, with the units usually being metres, but this information is optional and often doesn't exist in a file.  If it is missing, the default is 2834 pixels/metre, which is about 72 dpi.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Chris S

Thanks! I'll just use the tags from MacOS then as those appear to give me what I'm looking for.