Checking for Transparent Pixels

If I have a pic as Picture, I can access pic.RGBsurface, from which I can use pic.RGBSurf.pixel(x , y) to determine the color of any pixel in the picture. My question is whether it is possible to determine which pixels of the picture are transparent?

the white one ?

I think it will depend if the colors have an alpha component, or if the image has a mask… and in that case they are not always “transparent”

This is a regular New Picture( x, y); which presumably has no max, but has pixels with an alpha channel.

I guess my question is whether you can do something like anRGBsurface.pixel( x, y ) = someConstant to test for a transparent pixel,

where someConstant is like &c000000FF or &cFFFFFFFF . Hmm. or perhaps just mask the pixel extracted with bitAnd &h000000FF

Perhaps asked differently, does anyone know the constant color value literal that represents a transparent pixel? Guess I could find out empirically.

Perhaps try that and see what the results are?

and remember, alpha channel is degrees of transparancy… and I would ignore the “color” component, since a tranparent BLACK and a tranparent WHITE, are both just “transparent”

Yep. The value stored for a transparent pixel by default is &c00000000

Happy to know.