Bug: color data is discarded on PNG roundtrip for some border pixels that have RGB data and Alpha=0
- November 11, 2023
- 8 replies
- 755 views
It is very typical in the computer graphics industry to work with files that use RGBA channels separately ("data channels"). In these files, it can happen quite often that the alpha channel of a file is a mix of pixels that have alpha=0 and alpha != 0.
1. Download the attached file
2. Unpack
3. Import the PNG into Photoshop
4. (optional) Use Layer > Layer Mask > From Transparency to see the actual color data in the file (color pixels everywhere)
5. Export as PNG again (either with layer mask or the original, same result)
6. Open the new file in Photoshop
7. Check data with Layer > Layer Mask > From Transparency
8. Note that suddenly there's a white border around the image where the re-export as PNG has thrown away important color data. I think data loss on roundtrip of a file should be considered a bug.
Expected: full color data is still there after exporting as PNG again.
Actual: data loss in some regions of the image when exporting as PNG again. The original PNG file demonstrates very well that the data could stay in the file.
Version: Adobe Photoshop Version: 25.1.0 20231016.r.120 ca99df2 arm64
Platform: MacOS 14.0 Apple M2 Max, HybridCPU(8:4)
