Extracting Alpha Bit from a texture

Blitz3D Forums/Blitz3D Beginners Area/Extracting Alpha Bit from a texture

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.

Not sure if this will help, but here's some code to return integer/'normal' color values (from Vein).

Const RALPHA = 24	;Return Alpha when using RColor
Const RRED = 16	;Return Red when using RColor
Const RGREEN = 8	;Return Green when using RColor
Const RBLUE = 0	;Return Blue when using RColor

Function IntColor(R,G,B,A=255)	;Usage: WritePixelFast X,Y,IntColor(Red,Green,Blue,Alpha) or C = IntColor(Red,Green,Blue,Alpha) : WritePixel X,Y,C
	Return A Shl 24 Or R Shl 16 Or G Shl 8 Or B Shl 0
End Function

Function RColor%(c%,d%)	;Usage: Red = RColor(ReadPixelFast(255,127),RGREEN)
	Return c Shr d And 255 Shl 0
End Function