There is nothing predefined like this, but you can easily write this yourself. Use the javax.imagio.Imageio.read method to load both images, and then use the methods of the BufferedImage class to compare widths, heights and RGB values.
Alternatively, you could also generate an MD5 hash of both images and compare the hashes. This method would not tell you specifically what is different though. [ December 27, 2007: Message edited by: Chad Clites ]
Joined: Jan 24, 2006
cool, thanks a lot.
what I'm wanting to do is, I have a game I play(mmorpg) and you kill "monsters" and stuff, and what i was going to do was take certain screencaptures with the robot class and compare them to a static picture I took and saved, if they are alike, attack that "monster".
This might not be a good way, because the likely hood of me randomly taking a screen capture that is exactly alike is almost impossible.
I had another plan though:
have about 5 or 6 different threads and have them "scanning" a current copy of the gamescreen, If i come across a certain pixel color that is that of a "monster" attack that creature, and pause all other threads.
Is this a good approach?
subject: See if one picture is exactly like another...