Photoshop incorrectly saves pixel color information in PNGA images
- March 11, 2024
- 4 replies
- 578 views
This problem persists probably for eternity. For some reason while saving image as PNG with mask (alpha) Photoshop removes all color information completely from the image outside the mask bounding box.
For example (below). I have a 500 by 500 pixels canvas filled with a green color. On top of that background I have a magenta circle. I merge layers into one single layer and then I drew a shape with lasso tool and create a mask. This is the resulted image saved in PNG via "Export as" option with Transparency checked.
When I open it in any other image processing software, for example After Effects and check "Ignore" on Alpha in Interpret Footage (or select Alpha Full On in Shift Channels) I get this result.

The informations about pixel color outside the bounding box of the mask was completely deleted and replaced with white color.
I think that is completely unacceptable behavior and was done probably for a reason to reduce file size.
On contrarary After Effects doesn't do that, or any other software that I can recall.
To ensure that it is indeed bounding box issue, I did another test where I placed a single white pixel in opposite corners of the canvas in a mask channel.
Below is the example of somewhat expected behavior.

But it is not a pixel perfect workaround since I need to put unwanted information in my image.

I attached 3 files to this post. Test11 is unwanted behavior having deleted all color information outside of mask boundaries. Test13 is prove that is bounding box issue with pixel placed in corners. Test in AE is expected correct behavior without any additional pixels placed on image. Color information saved for every pixel on canvas with additional Alpha information on top.
