jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes Checking if two images are identical Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Checking if two images are identical" Watch "Checking if two images are identical" New topic
Author

Checking if two images are identical

Micho Lee
Greenhorn

Joined: Oct 21, 2003
Posts: 14
Is there a way to compare images or image objects in java to see if two images are identical?

Thanks a bunch!
Michael Fitzmaurice
Ranch Hand

Joined: Aug 22, 2001
Posts: 168
Hi Micho
You should be able to read the 2 image files as binary and compare them by performing a checksum on each. See the java.util.zip.CRC32 class for one such checksum mechanism.
Whether or not this is what you want depends on your definition of 'the same'. This method obviously requires them to be absolutley identical in their binary makeup. Perhaps you want some kind of fuzzy logic comparison of the graphical content of the images? If so, I can't think of any easy way to do that.
Hope this helps
Michael


"One good thing about music - when it hits, you feel no pain" <P>Bob Marley
 
Don't get me started about those stupid light bulbs.
 
subject: Checking if two images are identical
 
Similar Threads
Problem while using Birt with eclipse
Checking if two images are identical
Using a Comparator for the TreeSet class
identical hashcode values
Compare Two Images