Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

PNG exports break RGB channels

New Here ,
Mar 27, 2019 Mar 27, 2019

When I export or save as a PNG from a PSD the RGB channels are missing color information. It comes in with large areas of black and white which should all be red.

Layer>Layer Mask>From Transparency is how I am separating the rgb from the alpha in the png to see the error.

Image Pasted at 2019-3-27 13-47.png

3.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Mar 28, 2019 Mar 28, 2019

Did you check your psd file as well using Layer>Layer Mask>From Transparency?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 28, 2019 Mar 28, 2019

Hi

To open a PNG with solid layer and mask, search for and install the SuperPNG plug in. Then Open As "Superpng" and hold shift when opening. This will give you a dialogue asking whether to use transparency or to load the transparency mask as an alpha file - which will appear in channels and can be used as a layer mask.

Dave

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2020 Feb 07, 2020

Dave, your answer is great for identifying the problem, but it doesn't offer a solution to the actual problem.  I'm having a similar issue as goosezilla, and although Superpng does offer a workaround, it would be SO MUCH BETTER if Photoshop just did the right thing from the start.

 

Here's an example:  I start with a simple shield icon with well defined RGB layer data and a layer mask for transparency:

png transparency orignal.png

As you can see all the RGB data is solid purple.

 

After saving as a PNG and reopening I get this:

png transparency bad data.png

Photoshop has filled in the RGB data around the edges with garbage data, in this case white.  This is what it looks like with the alpha mask overlayed on the new RGB data.

png overlay.png

This happens whether I use Save As or Export, and it also happens with Superpng IF I try to save it out directly from a masked layer.  (Superpng does do the right thing if you have an opaque layer and put the mask in an Alpha Channel, which is OK but it adds more steps to my workflow).

 

I'm a game artist and we often need to maintain precise control over all for channels, RGBA.  I can't just have Photoshop randomly changing "transparent" RGB data on me.

 

I would LOVE it if Adobe would fix this and make PNG saving preserve RGB data.  (I don't really see any good reason why it doesn't?)  Alternately, if someone can point me to a PNG plugin that preserves RGB data when saving from a masked layer, that would be great too.

 

Thanks,

Matt

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2020 Feb 07, 2020

It's a bug in photoshop that's been around for more than twenty years and has been reported umpteen times, but maybe if you report it, adobe will finally listen and fix it. I can replicate it in photoshop 3.0.5 from 1995, the first photoshop version with layers.

 

https://feedback.photoshop.com/photoshop_family

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2020 Feb 07, 2020

Well...that's not very encouraging.  I guess I won't hold my breath. 😛

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2020 Feb 07, 2020

What version of photoshop and operating system are you using?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2020 Feb 07, 2020

System Info:

Adobe Photoshop Version: 21.0.3 20200115.r.91 2020/01/15: 21f283574f6 x64
Operating System: Windows 10 64-bit
Version: 10 or greater 10.0.18362.329

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2020 Feb 07, 2020

I know i said there was a bug having to do with this, but you shouldn't get the results your seeing just by opening your saved png, at least i can't replicate this unless i run Layer>Layer Mask>From Transparency after opening the saved png.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2020 Feb 07, 2020

The bug isn't introduced by opening, it's introduced when the PNG file is saved out directly from a masked layer.  When I bake that saved PNG in our engine, I see the white pixels introduced around the perimeter of the RGB.  

 

The only way I've found to save the PNG with the RGB intact is to use SuperPNG with an opaque RGB and a separately defined Alpha channel (not a layer mask).  In that case, SuperPNG allows you to stipulate the Alpha channel for the transparency source, and it saves without changing the RGB data.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2020 Feb 07, 2020

In SuperPNG does it make any difference if you check Clean Transparent when saving?

 

ct.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2020 Feb 07, 2020

No, in that case it fills all the transparent pixels with black.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 02, 2023 May 02, 2023

2023 any news on this issue? i'm trying out superPNG on the latest version but it's not working for me

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 02, 2023 May 02, 2023

Ramiro,

 

What operating system are you using?

 

Super PNG is not working how?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 15, 2023 Jul 15, 2023

Hi, I'm also trying SuperPNG on the 2023 version. I can import a png using SuperPNG, but while exporting, I can only use Photoshop's standard Quick export as PNG (which breaks my results) and Export as... which doesn't allow me to choose SuperPNG export options as well. Is there a workaround?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 15, 2023 Jul 15, 2023

Ok, follow up since I can't edit my post. I can use SuperPNG functions by choosing a Save a Copy.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 15, 2023 Jul 15, 2023
LATEST

In the photoshop preferences under File Handling you can check Enable Lagacy "Save As", so you no longer need to click Save a Copy.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines