PixMap and AlphaChannel

BlitzMax Forums/BlitzMax Beginners Area/PixMap and AlphaChannel

Hi Guys!!
i need to "scan" a pixmap and detect if a pixel is "on" or off

i use ReadPixel(MyPixMap,x, y) that return RGBA integer
...
now the problem is that how can i detect if a pixel is on (colored) or off (trasparent)?

many thanks!

Won't it have values between 0-255 to show how much alpha is on each pixel? E.g. 0 = Full Alpha, >0 and < 255 = 'some' alpha, 255 = No alpha?
Graphics 640 , 480
Local image:TPixmap = LoadPixmap("maxsmall.png")
For Local x = 0 To pixmapwidth(image)-1
	For Local y=0 To pixmapheight(image)-1
		torgb(ReadPixel(image,x,y))
	Next
Next
Function torgb(argb:Int)
 	 Local a:Int =(argb Shr 24) '& $ff
 	 Local r:Int =(argb Shr 16) & $ff
 	 Local g:Int =(argb Shr 8)  & $ff
 	 Local b:Int = argb & $ff
	 Print ("a: " + a + " r: " + r + " g: " + g + " b: " + b) 
Print
End Function


The pixmap is small (10*10) in this case.
<edited> to make clearer but not sure if I have.

tonyg thanks!!!