Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare to picture boxes

Status
Not open for further replies.

jmprice

Programmer
Jan 24, 2005
8
US
I need some help comparing to picture boxes. I guess the question is how. I was think in of saving all the rgb values of the points into an array. Then comparing the two arrays. Is there a better way??
 
Depends what it is that you are trying to achieve with this comparison. Can you explain further?
 
Basically, if picturebox1 = picturebox2 then do somthing cool. I am grabing areas of the screen, putting them in picture boxes and I need to compare them to see if it is the same image.
Thanks in advance for any help
 
You could start by checking the height & width - if they are different then so are the images...

If you do have to do a pixel-by-pixel check, then, if your pictureboxes are large, it will be quite slow to do the comparison using the pb.point(x,y) method. You'd be better to grab the bitmaps associated with the image and then the data array inside it & compare those.

If you are not sure how to do that, see for lots of helpful info.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top