Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I cannot compare colors, I have a box and I want the program to search each pixel to the left until it finds one that is not white, I just need to know how to programmitically in visual basic.net compare colors. Any help given is greatly appreciated.
  • *Experts*
Posted (edited)

You'll need to compare the ARGB integer value of the color in your loop.

For x = 0 To bmp.Width - 1
   For y = 0 To bmp.Height - 1
       If bmp.GetPixel(x, y).ToArgb = -1 Then
           MessageBox.Show("white pixel")
       End If
   Next
Next

Edited by DiverDan

Member, in good standing, of the elite fraternity of mentally challenged programmers.

 

Dolphins Software

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...