ARGB

Started by GrindalfGames, April 01, 2019, 19:31:11

Previous topic - Next topic

GrindalfGames

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 ..

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 )

GrindalfGames

Thanks that is perfect