You can compare two text files very easy with diff
and even better with meld:
If you use diff for images, you get an example like this:
$ diff zivi-besch.tif zivildienst.tif
Binary files zivi-besch.tif and zivildienst.tif differ
Here is an example:
Original from http://commons.wikimedia.org/wiki/File:Tux.svg
Edited:
I've added a white background to both images and applied GIMPs "Difference" filter to get this:
It is a very simple method how a diff could work, but I can imagine much better (and more complicated) ones.
Do you know a program which works for images like meld does for texts?
(If a program existed that could give a percentage (0% the same image – 100% the same image) I would also be interested in it, but I am looking for one that gives me visual hints where differences are.)
Best Answer
Yes, such a program exists!
ImageMagick has the
compare
utility, which has several ways of comparing images.To install it:
Comparing two images visually:
tux_orig.png
&tux_modified.png
Gives this image:
Comparing two images via metrics:
There are also many ways to output the differences via some metrics, e.g.:
Some metric options:
There are many ways to compare images, see ImageMagicks section on compare for further methods.