Dim b As Bitmap = PictureBox1.Image
Dim pixelcolor As Color = b.GetPixel(x coord, y coord)
You simply put the image into a Bitmap object and then use the GetPixel method of the Bitmap object to get the color. In this example the variable pixelcolor will now contain the color of the pixel at the specified point.
ok. that works fine for images, but what if i want the color of a point on a form? like when i have used a pen object to draw lines and i want to know if a point has been colored by the line?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.