Is any quality lost when saving a flat RGB PSD as PNG?

Sometimes when I have a PSD I’m working on, and I flatten it and do an incremental save, I save as PNG instead of PSD because (1) the file can be opened even without Photoshop on another machine, (2) it is obvious that it’s flat from the file extension alone, and (3) PNG will result in a much smaller file size.

What I would like to know is, am I losing any image quality by doing this? I am wondering about color data, or possibly other data I haven’t considered.

Considerations & details worth mentioning:

  • Let’s assume saving in the same bit depth, 8-bit PSD to 8-bit PNG, or 16-bit PSD to 16-bit PNG. (32-bit PSD to PNG doesn’t work through the Save As menu, and using Export produces an 8-bit PNG)
  • I am aware that guides are lost once the PNG is closed and re-opened.
  • I am also aware that CMYK color space is unsupported in PNG, so this question only applies to RGB PSD files.
  • I realize paths won’t be saved in a PNG file.
  • I realize additional channels (from saved selections, etc) won’t be saved in a PNG file.
  • Let’s assume saving with the “Large file size” setting in PNG Format Options. (Other settings have caused problems when trying to re-edit later)

Thanks.

Answer

I’ll try to make it more clear: PNG format supports a lot of different combinations of channels: if you want, you can read more in depths in the format description.

Generally people care about two types: PNG8 (8bit per pixel, 256 colors) and PNG24 (24bit bit per pixel, Truecolor). Note that when you have a document in Photoshop that says 8bit, it’s 8bit per channel, not in total (so it’s actually a 24b image), you can read more about color depth and how the number of colors is calculated here.

PNG images also can include transparency:

  • for PNG8 Photoshop only can have a 1bit transparency (so a pixel is
    transparent or not transparent) but there’re other utilities
    that can save PNG8 with 8bit alpha transparency
  • for PNG24 Photoshop can save full color image and full alpha transparency (technically it’s a PNG32 now: 24b for color and 8b for transparency, but Photoshop just calls it PNG24 with transparency)

So to answer your question,

  • if you save 8-bit documents with PNG24 you won’t lose any data — no matter if your document has transparency or not;
  • if you’re saving an 8-bit document with PNG8, you’ll lose colors (16mil colors will become 256)
  • if you’re saving an indexed color document (that has 256 colors at most — re-saving an existing .gif or indexed .png file for example), saving a PNG8 won’t lose any data;

And several examples. The black images in the bottom row are the results of png images being put in Difference blending mode against the original psd: black means no pixels changed: png24 is completely black, png8 has a lot of non-black pixels due to color loss. Also note how PNG8 from Photoshop didn’t preserve alpha gradient and PNG made by pngquant preserved it while compressing the image:

enter image description here

Attribution
Source : Link , Question Author : Mentalist , Answer Author : Sergey Kritskiy

Leave a Comment