Compare one image to another?

diurnal

New member
Joined
Jul 14, 2007
Messages
2
Programming Experience
Beginner
Hi all,

I'm doing a little project (big for me because I'm pretty much a noob). I have this soltaire game and when a card is captured. I want that card to be colored with a blue background. In other words, that its been played.

How would you go about comparing 1 card say the ace of spades to that same card in another picturebox? Meaning The card is capture in one picturebox and the other picturebox will turn a certain color, making it disappear.

My pseudo code is something like this:
If pictbox1 = pictbox2 Then
color that pictbox2 to blue
Else leave it visible
End IF

So the real problem is how do I compare images and define them, like a .bmp to the same image as in ,say pictbox2.

Could I find a specific hex color on the card and then the card in pictbox2 disappears. How would you define hex color and how would you analzye it?

Sorry for the many questions. If you have a question I can clear it up for you.

Thanks

PS working with vb.net 2005
 
I think you have the wrong approach, find another way of referencing cards and keeping track of them, the image should be left what it is - just a visual presentation of the card value. This thread you might find interesting when dealing with cards.
 
Thanks for the reply.

Are you saying this method would still work if the card game is already made. In essence it would be a card counter for another program?
 
No, I'm saying you should not compare images of cards, you should compare card values.
 
Back
Top