]> git.donarmstrong.com Git - lilypond.git/commitdiff
output-distance: Add new flag for `compare'.
authorPatrick McCarty <address@hidden>
Wed, 25 Nov 2009 05:27:34 +0000 (21:27 -0800)
committerGraham Percival <graham@percival-music.ca>
Mon, 27 Dec 2010 21:29:30 +0000 (21:29 +0000)
Newer versions of ImageMagick seem to be more picky about comparing
images that are not very similar.

I don't know any further details, but this patch fixes `make check' for
me when comparing release/2.13.7-1 with release/2.13.8-1.

I am running ImageMagick 6.5.7-10.

Graham adds: I bumped imagemagick in GUB, and this is required to
do 'make check' in ubuntu lilydev remix, so I'm adding this now.

scripts/build/output-distance.py

index 6b63e79f90cccf3c12aa7d769c12a26d73903015..19b14435f630e7218f191d59aec56d2a4f9be241 100644 (file)
@@ -87,7 +87,7 @@ def compare_png_images (old, new, dest_dir):
     system ('convert -depth 8 -crop %dx%d+0+0 %s %s/crop1.png' % (dims + (old, dir)))
     system ('convert -depth 8 -crop %dx%d+0+0 %s %s/crop2.png' % (dims + (new, dir)))
 
-    system ('compare -depth 8 %(dir)s/crop1.png %(dir)s/crop2.png %(dir)s/diff.png' % locals ())
+    system ('compare -depth 8 -dissimilarity-threshold 1 %(dir)s/crop1.png %(dir)s/crop2.png %(dir)s/diff.png' % locals ())
 
     system ("convert  -depth 8 %(dir)s/diff.png -blur 0x3 -negate -channel alpha,blue -type TrueColorMatte -fx 'intensity'    %(dir)s/matte.png" % locals ())