I have a bitmap named bmp that is 256x256 and contains all white pixels that were assigned by
When I try to use a comparison to determine the color using:
, it never works properly.
However, if I use
to get any pixel with a Red value of 255 (white included), the comparison succeeds.
What am I doing wrong with the first example?
I would like to get the first example working because the if statements get very long when I have to type
to search for red.
Any help would be appreciated.
VB.NET:
bmp.setpixel(x,y,color.white)
When I try to use a comparison to determine the color using:
VB.NET:
if bmp.getpixel(x,y) = color.white then
label1.text = "success"
end if
However, if I use
VB.NET:
if bmp.getpixel(x,y).R = 255 then
label1.text = "success"
end if
What am I doing wrong with the first example?
I would like to get the first example working because the if statements get very long when I have to type
VB.NET:
if bmp.getpixel(x,y).R = 255 and bmp.getpixel(x,y).B = 0 and bmp.getpixel(x,y).G = 0 then
label1.text = success
end if
to search for red.
Any help would be appreciated.
Last edited: