How do you embed resolution/scale in a png?
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;
- I have a large library of thousands of pngs which are used as modular elements in Illustrator compositions for print.
- The pngs which I’ve exported from Illustrator using the asset export panel, with 300ppi explicitly set as the scale, appear at the correct size on the artboard when brought back into Illustrator.
- Just to be clear, when I talk about scaling objects in Illustrator I mean transforming the object’s size relative to an artboard of a certain print size and not altering the pixel dimensions of the png itself.
- The problem is pngs exported from Photoshop; when brought in to Illustrator they appear exactly 416.66% too large, in other words they’re 72ppi against the artboard. I have to scale them down by 24% to make them 300ppi against the artboard (otherwise they’re blurry when printed).
- I can’t find any way in Photoshop to explicitly set the ppi of exported files …
- The Photoshop file from which these pngs were exported has 300ppi set under Image>Image Size. This makes no difference.
- The raster effect settings in Illustrator is 300ppi… (a red herring that people like to talk about)
There are three solutions (workarounds) I know of;
- re-scale objects in Illustrator by 24%. I’ve got an action for this. It works, but I’d rather have the images automatically appear at the right scale in the first place.
- Import PSDs to Illustrator and use the asset export panel with the scale/resolution explicitly set to 300ppi. Its works beautifully except that, for some reason, the pngs seem to be lower quality/smaller file size than when exported from Photoshop. Hmm!
- Batch-run an action that sets Image>Image Size>300ppi on the entire png library directory… takes ages and has to be run on all new pngs coming in.
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;
- ExportOptionsSaveForWeb options in http://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-cc-javascript-ref.pdf (can’t find anything about resolution)
- Checking the metadata of png files exported from Illustrator which appear at the correct scale to see what’s different; haven’t spotted anything.
Cheers!
