Photoshop CS6 vs CC2015 PNG Resolution & Unit

Started by Stephen Marsh, January 26, 2017, 08:13:38 PM

Previous topic - Next topic

Stephen Marsh

I have searched the site and come across some past discussion, however it appears that with Photoshop CC15 or later there have been some changes (hacks?)...

First in Photoshop CS6 or earlier, when using "save as" to a standard PNG info is written to the PNG file. However, this info is not visible in Adobe Bridge as a resolution:

[PNG-pHYs] PixelsPerUnitX : 18622
[PNG-pHYs] PixelsPerUnitY : 18622
[PNG-pHYs] PixelUnits : meters



However with Photoshop CC15 or later, using a save as results in these new XMP-tiff tags being added, which now show up as a resolution in Adobe Bridge (even in CS6):

[PNG-pHYs] PixelsPerUnitX : 18622
[PNG-pHYs] PixelsPerUnitY : 18622
[PNG-pHYs] PixelUnits : meters

[XMP-tiff] XResolution : 473
[XMP-tiff] YResolution : 473
[XMP-tiff] ResolutionUnit : inches


(186.22cm x 2.54cm = 472.9988 inches)

My guess is that Adobe have "extended" (hacked?) the writing of PNG files to support these "printcentric" metadata values, they are of course not written when using save for web or quick export options. For CS6, Photoshop reports the resolution as 473ppi, even though the metadata is written as 18622ppm – so I can only presume that Photoshop has always converted and rounded up the PNG-pHYs values anyway, where as Bridge did not and now bridge references the XMP-tiff values.

So this is just a "heads up" post.

Stephen Marsh

#1
It appears that in CC2018, Photoshop is now ONLY using the correct PNG specification tags when using the "save as" command:

[PNG-pHYs]      PixelsPerUnitX     : 11339
[PNG-pHYs]      PixelsPerUnitY     : 11339
[PNG-pHYs]      PixelUnits         : meters


(There appears to be some rounding going on, 288ppi in CM = 113.386)

Which now means that Adobe have broken their "tiff metadata hack" to show PPI in Adobe Bridge for PNG images!

So if one wishes to add this data back in (which is not to specification) so that Adobe Bridge can show a PPI value:

exiftool -XMP-tiff:XResolution=288 -XMP-tiff:YResolution=288 -XMP-tiff:ResolutionUnit=inches 'path to file'

Phil Harvey

Adobe has never been very good at supporting PNG I'm afraid.  :(

- 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 ($).