PHOTOSHOP - PNG Saving transparency confusion

  • 1
  • Problem
  • Updated 3 years ago
  • (Edited)
Since the most recent update there is a problem with saving PNG transparency. We used to have the transparent layer with a "background" when you turned the background off it would save the PNG but the transparency it would feather into was based on the colours in the original background layer. Now when you save a png it seems to just make up any colours for the background. This is a serious problem as a games developer well underway with our project as we are now having to go through every texture map and graphic in our game and replace them with TGAs. We are losing all the convenience of the PNGS which is our preferred format. It used to work but sometimes would take ages to save the PNG if it was a larger image. Whichever "fix" you implemented has broken it and left us with"fringing" on all our transparent textures. You may never notice the issue unless you start to layer the pngs in a game engine or Maya but for us its a very serious problem. We are currently reverting to old CS2 to get pngs done.
Photo of chris black

chris black

  • 2 Posts
  • 0 Reply Likes
  • frustrated

Posted 3 years ago

  • 1
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 818 Reply Likes
The value of colors in fully transparent areas is undefined (and will depend on the history of your document).

And the behavior of color values in transparent areas has not changed in Photoshop.
Nor have we changed any of the transparency handling in PNG.
If you see color values from fully transparent areas coming into your image - that means a bug with whatever is reading and using the PNG image (failing to handle transparency correctly).
Photo of chris black

chris black

  • 2 Posts
  • 0 Reply Likes
HI Chris,
Thanks for this, we used to have the background layer and this would act as a kind of history, we would turn it off and save the layer as a PNG. This doesn't work anymore and this is our problem. Is there anyway we can fool photoshop into using a certain pixel history when it saves the PNG?

We were having a problem with larger PNGs taking ages to save but an update fixed this but or background layer "trick" doesn't work anymore.

Photoshop is the only piece of software which changed. Maya our shader network and our final output remain the same.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 814 Reply Likes
No, there is no "history".
Photoshop really hasn't changed the behavior of color values in fully transparent areas (they are still dependent on the operations previously applied to the layer).

You can copy the layer opacity to a layer mask (Layer -> Layer Mask -> From Transparency ), and disable that mask to paint in the values you want.

And again, anything that is exposing the color values in full transparent areas, has a problem and may not be supporting PNG correctly.