ARGB to red green and blue

BlitzMax Forums/BlitzMax Programming/ARGB to red green and blue

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

and is only logical operator in blitzmax while & is bitwise operator.

Vorderman: sorry had an 00 too much in the red line.
This one should work:

alpha = argb & $FF000000
red = argb & $00FF0000
green = argb &0000FF00
blue = argb &$000000FF

( the shr does nothing else than that. It just shifts the stuff to right to "kill" the 0s ... so it is an operation that is not needed if you know the exact bit length )