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

joinJpegs picture joinJpegs · Mar 28, 2009 · Viewed 21.8k times · Source

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.

Answer

joinJpegs picture joinJpegs · Mar 31, 2009

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.