Pixels Alpha Value?
Blitz3D Forums/Blitz3D Programming/Pixels Alpha Value?
| ||
How can you determine the alpha of a pixel using readpixel or readpixel fast? I have code to extract the RGB from a pixel value, but how about Alpha? Function Red(argb) Return (argb Shr 16) And $ff End Function Function Green(argb) Return (argb Shr 8) And $ff End Function Function Blue(argb) Return argb And $ff End Function |
| ||
John - Just been looking into this - alpha is encoded in the next set of 8 bits (argb shr 24) and $ff. 0 is see thru, up to 255 solid. |
| ||
Thanks 0DFEx Just saw your function in Jeroen's post, that works a treat :) |