Copy link to clipboard
Copied
I’m looking for a way to embed resolution (ppi) information in a png when exporting from Photoshop. I believe it’s possible because if you re-open a png, Image>Image Size>300ppi, save, then it behaves properly. Illustrator’s newish asset export feature can do it too.
I see that questions similar to this get asked an awful lot but answers generally come back along the lines of “Ima explain you all about raster resolution for screens and why changing from 72ppi to 300ppi won't make it print better do something else instead”, so I’ll try to be precise about what I’m asking and why;
There are three solutions (workarounds) I know of;
So if you know of a way to have Photoshop embed resolution/scale/ppi info in a png then I’d love to hear it!
So far I’ve tried;
Cheers!
Copy link to clipboard
Copied
This was clearer when the Export option was called Save For Web. Since it was for saving for web, the argument goes, resolution was irrelevant, so PNGs did not set it. Unfortunately calling it Export makes it sound a general feature, but it isn't! So use Save As instead of Export.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Further to Test Screen Names – post #1…
Using export/save for web strips some or all metadata (even if S4W is set to retain metadata)…
In CC2018 – Save As PNG results in the following key metadata values being set, which are not included in the other various export options (my original was 288ppi😞
[PNG-pHYs] PixelsPerUnitX : 11339
[PNG-pHYs] PixelsPerUnitY : 11339
[PNG-pHYs] PixelUnits : meters
(Reported via ExifTool)
11.8. Physical Pixel Dimensions (pHYs)
4.2.4.2. pHYs Physical pixel dimensions
So a value of 113.39 (CM) x 2.54 (Metric Inch Conversion) = 288 ppi
The PNG specification works in a unit value of metres. Photoshop apparently translates the embedded PNG-pHYs data into PPI when opening the file (even if rulers are set to say CM).
There appears to be some rounding up, for 288 ppi in CM = 113.386 or 113.39
The ExifTool command to change from say 288 ppi (11339) to 144 ppi (5670) =
exiftool -PixelsPerUnitX=5670 -PixelsPerUnitY=5670 -PixelUnits=meters 'path to file here'
So the above command could be used to re-embed the required metadata into PNG files exported from Photoshop, without needing to re-open and re-save the PNG files.
Note: There were non-standard metadata writing changes in CC2015 which have been removed in CC2018: