ICO: Zero all channels for AND-mask-transparent pixels#3003
Conversation
|
@RunDevelopment Thank you for the review! You are right that the AND mask only determines the transparency of the pixel. As I've understood the code, here we are decoding the image to an RGBA buffer, and when the AND mask marks a pixel as transparent, the previous code already set alpha to 0 which makes the color invisible, so this change additionally zeros the RGB channels to clean up that unused data |
|
I think you misunderstood what I said. My comment is talking about how ICO files are supposed to be decoded according to the linked resources. I know how we're doing it and what your PR changes. I'm asking whether those changes are correct. Hmmm, I tested it with GIMP and that does leave the transparent white in the two test images as is. However, GIMP did decode various image formats incorrectly in the past, so take this with a grain of salt. |
Zero out all four channels (R, G, B, A) instead of only the alpha channel when the AND mask marks a pixel as transparent.
Previously, transparent pixels retained their original RGB values, which left meaningless data in the output buffer. Now they are fully zeroed.
Also updated reference images to reflect the new output.