From 00b4beb005ce6d037e671275f691f977f3d7bc9a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys <hanwen@xs4all.nl> Date: Tue, 19 Dec 2006 13:50:41 +0100 Subject: [PATCH] Use -depth 8 for compare/composite. Drop border around image. --- buildscripts/output-distance.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/buildscripts/output-distance.py b/buildscripts/output-distance.py index 787c3a71a7..fd09f02a5a 100644 --- a/buildscripts/output-distance.py +++ b/buildscripts/output-distance.py @@ -296,14 +296,14 @@ def compare_png_images (old, new, dir): dims = (min (dims1[0], dims2[0]), min (dims1[1], dims2[1])) - system ('convert -crop %dx%d+0+0 %s crop1.png' % (dims + (old,))) - system ('convert -crop %dx%d+0+0 %s crop2.png' % (dims + (new,))) + system ('convert -depth 8 -crop %dx%d+0+0 %s crop1.png' % (dims + (old,))) + system ('convert -depth 8 -crop %dx%d+0+0 %s crop2.png' % (dims + (new,))) - system ('compare crop1.png crop2.png diff.png') + system ('compare -depth 8 crop1.png crop2.png diff.png') - system ("convert diff.png -border 2 -blur 0x3 -negate -channel alpha,blue -type TrueColorMatte -fx 'intensity' matte.png") + system ("convert -depth 8 diff.png -blur 0x3 -negate -channel alpha,blue -type TrueColorMatte -fx 'intensity' matte.png") - system ("composite matte.png %(new)s %(dest)s" % locals ()) + system ("composite -depth 8 -type Palette matte.png %(new)s %(dest)s" % locals ()) class FileLink: def __init__ (self): -- 2.39.5