summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2013-05-22 13:21:45 +0100
committerJosé Fonseca <jfonseca@vmware.com>2013-05-22 13:21:45 +0100
commitdbef9b6d901ef16e4d42bffea0b8b108bd9e5b0c (patch)
treef17a67c2a6ed6b3bd0d2a5630da58846e2e0b5a3 /scripts
parentf65c6851c2be29506befa3c4477dcb8d963bfee6 (diff)
snapdiff: Avoid problems when there is a size mismatch.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/snapdiff.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/snapdiff.py b/scripts/snapdiff.py
index aa65f51c..59ec870e 100755
--- a/scripts/snapdiff.py
+++ b/scripts/snapdiff.py
@@ -71,6 +71,9 @@ class Comparer:
return self.ref_im.size != self.src_im.size
def write_diff(self, diff_image, fuzz = 0.05):
+ if self.size_mismatch():
+ return
+
# make a difference image similar to ImageMagick's compare utility
mask = ImageEnhance.Brightness(self.diff).enhance(1.0/fuzz)
mask = mask.convert('L')