Search code examples
javacrc32image-comparison

java.util.zip.CRC32 comparing image files


Is there any suggestion (piece of code) that helps me to understand the concept of how to compare two different image files whether they are same or not?

Thanks in advance.

EDIT: I mean, for example, I should check the CRC32 (that which I do not know how to do) with size check of the file. Then it means they are identically same pictures...

EDIT2: When I say images are the same, I mean images are looks exactly the same to the user.


Solution

  • You can use CRC32 to sum any file. However if you want to find out if two images are the same you have to decide whether two images which look the same are the same. e.g. The following images all have different sizes let alone different CRC32 numbers.

    enter image description here enter image description here enter image description here enter image description here