Not sure I follow - especially if it already depends on IM, how is it different from 'convert -compose difference' or a similar operator?<p><a href="http://www.imagemagick.org/Usage/compose/#difference" rel="nofollow">http://www.imagemagick.org/Usage/compose/#difference</a>
This is cool, and a good idea. I will try it out, but I can highly recommend the existing pdiff utility for your image regression testing.<p><a href="http://pdiff.sourceforge.net" rel="nofollow">http://pdiff.sourceforge.net</a><p>Pdiff allows you to specify perceptual thresholds of visibility, so diffs that are not pixel perfect can still pass if they're 'good enough'. Semi-critical if you render the input images using different browsers or at different resolutions, or if your images have any sub-pixel randomness.<p>Lots of people (myself included) have used pdiff successfully in production. It doesn't depend on ImageMagick (a bonus in my book). And it's already available in lots of Linux distros.
ImageMagick already ships the `compare` command [0] which does exactly this.<p>It also accepts a bunch of CLI flags such as -fuzz to consider colors within a certain distance as equal. That flag is very useful when dealing with JPG or similar compression that slightly alters pixels, so you can ignore these barely visible differences and focus on the 'real' differences.<p>0: <a href="http://www.imagemagick.org/script/compare.php" rel="nofollow">http://www.imagemagick.org/script/compare.php</a>
Interesting, I couldn't find a tool like this that would give me a useful % difference between images, so I rolled my own tiny python version using PIL: <a href="https://github.com/nicolashahn/python-image-diff" rel="nofollow">https://github.com/nicolashahn/python-image-diff</a><p>which gives both a diff image and the % difference.
Or you can import the two images into graphics software like gimp. Invert the colours in the top image, then knock transparency for that layer down to 50%. If the images are identical, you'll just see grey. Any differences will instantly become visible.
Not sure what was the intent behind creating this.<p>Once upon a time (several years back), I worked on one. The intent therein was two compare images produced by different versions of a product. As such, one of the major features was motion detection [0] (apart from computing deltas between the images). We made use of OpenCV [1].<p>[0] <a href="https://en.wikipedia.org/wiki/Motion_detection" rel="nofollow">https://en.wikipedia.org/wiki/Motion_detection</a><p>[1] <a href="https://en.wikipedia.org/wiki/OpenCV" rel="nofollow">https://en.wikipedia.org/wiki/OpenCV</a>
I hacked up something quickly for a one-off need to render two websites as images and diff them a few years back (warning - I'm not a developer (clearly)) - <a href="https://github.com/sammcj/urldiff" rel="nofollow">https://github.com/sammcj/urldiff</a>
Combine this with my webscrot and diff development vs production websites :-)<p><a href="https://github.com/adnanh/webscrot" rel="nofollow">https://github.com/adnanh/webscrot</a>