This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Checking if two images are identical

 
Micho Lee
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic