Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Experts*
Posted

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.

Posted
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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...