Bitwise masking
BlitzMax Forums/BlitzMax Beginners Area/Bitwise masking
| ||
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 |
| ||
Local Color:Int = $AA112233 Print Hex(Color) Color:& $00FFFFFF 'Color=Color & $00FFFFFF Print Hex(Color) |
| ||
Ahh thanks Zeke For reference I also have this code for "argb" related manipulation: |