I see many questions about how to load a PNG with an alpha channel and display it, but none about how to load a PNG that has an alpha channel but ignore the alpha channel, revealing the underlying RGB data.
I've tried simply removing all the data from the alpha channel, but I just get black pixels instead of the color data I want. It seems that from the moment I create the Bitmap object, it does not contain any color information in pixels where alpha is 0, though I assure you that information is physically there in the PNG.
To be clear, if my image contains a pixel with these values: (R:255 G:128 B:128 A:0) I need that pixel to be (R:255 G:128 B:128 A:255), not (R:0 G:0 B:0 A:255).
Thanks
EDIT: The previous information is incorrect. The bitmap contains all the information when using:
Bitmap myImage = Bitmap("filename.png")
;
What i was doing wrong is afterwards using:
Bitmap otherImage = Bitmap(myImage);
It seems that this is what nullifies the data I needed. Instead, I am now using
Bitmap otherImage = (Bitmap)(myImage.Clone());
and afterwards manually setting the alpha channel to opaque using lockbits. I hope this may be useful to someone in the future.