32-bit images *using* the alpha byte

BlitzPlus Forums/BlitzPlus Programming/32-bit images *using* the alpha byte

Alphasource# = alphaintvalue / 255

this converts a 0 to 255 alpha value toa 0 to 1 floating point value.

alphadest# = 1 - alphasource#

red = (redsource * alphasource#) + (reddest * alphadest#)
green = (greensource * alphasource#) + (greendest * alphadest#)
blue = (bluesource * alphasource#) + (bluedest * alphadest#)

then just change the destination color to the above red/green/blue color...

Note, however that this isn't fast enough for most real time use...