Bitwise masking

BlitzMax Forums/BlitzMax Beginners Area/Bitwise masking

EOF(Posted 2010) [#1]
How do you mask out (or toggle OFF) values using bitwise operations?

For example, I am using the pixmaps ReadPixel() and want to WritePixel() back but excluding the alpha channel

The value read is 32 bit in the form of $AARRGGBB
I want to write back the equivalent of $00RRGGBB


Zeke(Posted 2010) [#2]
Local Color:Int = $AA112233
Print Hex(Color)
Color:& $00FFFFFF 'Color=Color & $00FFFFFF
Print Hex(Color)



EOF(Posted 2010) [#3]
Ahh thanks Zeke

For reference I also have this code for "argb" related manipulation: