Languages & Coding > Blitz2D, BlitzPlus, Blitz3D

ARGB

(1/1)

grindalf:
Ive been messing around with readpixelfast and writepixelfast but Im not sure how to alter the argb values that I get from the readpixelfast command.
in simple commands

getcolor x,y
red=colorred()
color red+10,0,0
plot x,y

How would I go about doing that with the read/write fast commands?

STEVIE G:
Something like this ..


--- Code: ---argb = ReadPixelFast( i,j, TextureBuffer( Texture ) )
r = ( argb And $FF0000) Shr 16
g = ( argb And $FF00 ) Shr 8 
b = ( argb And $FF ) 
a = ( argb And $FF000000 ) Shr 24
r = r + 10
argb = ( a Shl 24 ) Or ( r Shl 16 ) Or ( g Shl 8 ) Or b
WritePixelFast i , j , argb, TextureBuffer( Texture )

--- End code ---

grindalf:
Thanks that is perfect

Navigation

[0] Message Index

Go to full version