-
Color Detection
Is it possible for a program to look for a color, and then be able to detect it? Like for example you have a picture of the american flag, and you put in the exact blue thats on the flag, you turn on the program and it beeps it it has that blue? And I am not saying this for images spesifically, I'm saying on your general screen, or on a web browser within the program.
-
Re: Color Detection
Yes, it is possible.
Oh, you want to know how? Well you should have said so...
If you have an image you can loop through its X and Y coordinates and get the color at each of those coordinates (look up Bitmap.GetPixel).
If you are talking about the screen in general, it is possible to get the color at a specific point but I don't know how. I'm sure google can tell you.
As for comparing colors, use the = symbol.
Code:
If bmp.GetPixel(3, 15) = Color.FromArgb(139, 139, 100) Then '...