An easy way (tool?) to compare images pixel for pixel in different formats?

23,572

Solution 1

Thanks for the suggestions.

I tried the Gimp approach first which works well except when the difference between the images are very small. I couldn't find an "enhance differences" option to make the differences obvious and the histogram also only gives a rough representation of the differences.

In the end I used ImageMagick something I'd installed a while ago and forgot all about. Creating a difference/comparison image is as easy as typing:

 compare first.jpg second.png difference.gif

in the command line.

It's all nicely explained here.

Solution 2

TortoiseIDiff is a free image diff viewer:

http://tortoisesvn.tigris.org/TortoiseIDiff.html

It is part of TortoiseSVN, but can be used without Subversion.

Depending on your project, not all files which are under version control are text files. Most likely you will have images too, for example screenshots and diagrams for the documentation/helpfile.

For those files it's not possible to use a common file diff tool, because they only work with text files and diff line-by-line. Here is where the Tortoise Image Diff tool (TortoiseIDiff) comes to the rescue. It can show two images side-by-side, or even show the images over each other alpha blended.

Solution 3

You could do a lot worse than Perceptual Diff.

Solution 4

The best approach would be to use Pix for windows (comes with the DirectX SDK). Supports Bitmap, PNG and Jpeg...Enjoy!

Solution 5

Use an image editor like Photoshop or the Gimp or whatever, which has multiple layers. Create an image where each source image in a separate layer.

At this point, you can visually compare the images by toggling the top layer's visibility off and on.

In most decent editors, you can also set the top layer to "difference" mode. Now each image pixel's value is the absolute difference of the pixel values in the underlying images. You can use e.g. a histogram tool to see if the images are identical. If they're identical, then all the pixel values will be exactly 0.

Share:
23,572
joinJpegs
Author by

joinJpegs

Updated on July 09, 2022

Comments

  • joinJpegs
    joinJpegs almost 2 years

    Well I've written a basic lossless jpeg joiner thing in java now but I'd like to compare the files it produces with the original files.

    I can only compare so much in a hex editor, does anyone know of an easy way, software or java based (preferably software as I dont feel like any more coding for now!) that I can compare two images and produce a "difference map" of where the pixels aren't the same?

    Thanks.