Create white image mask

BlitzMax Forums/BlitzMax Programming/Create white image mask

You're along the right lines, but I think you've got your bit manipulation calculations wrong. Also, use Hex, it's a bit easier to read...

If (pixel & $ff000000) Then
  WhitePixel pmap,x,y,$ffffffff
EndIf

This does a bitwise check on the alpha channel of your image and writes a pure whilte, fully opaque pixel to the destination image where the alpha channel is greater than 1.