Live data from Hacker News

Image-diff – Create an image differential between two images

github.com

21–27 of 27 posts

Re: Image-diff – Create an image differential between two images

#23
post #17
post #9

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. http://pdiff.sourceforge.net 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…

>It doesn't depend on ImageMagick (a bonus in my book) Why is it a bonus besides lowering the number of dependencies?

https://imagetragick.com/

Re: Image-diff – Create an image differential between two images

#24
ImageMagick already ships the `compare` command [0] which does exactly this.

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.

0: http://www.imagemagick.org/script/compare.php

Re: Image-diff – Create an image differential between two images

#25
post #4
post #2

Not sure I follow - especially if it already depends on IM, how is it different from 'convert -compose difference' or a similar operator? http://www.imagemagick.org/Usage/compose/#difference

It looks like it's a thin wrapper around "GraphicsMagick for node". Which itself is a javascript wrapper around GraphicsMagick / ImageMagick.

I'm so glad I didn't go into web development.

Re: Image-diff – Create an image differential between two images

#27
post #24

ImageMagick already ships the `compare` command [0] which does exactly this. 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. 0: http://www.imagemagick.org/script/compare.php

This literally just calls ImageMagick.
Post reply on HN