From 63f084795b6d0a10d1f4daef45cc54e88c8acac9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 13 Dec 2011 15:53:49 +0000 Subject: [PATCH] snapdiff: Compare .bmp images too. Quite common too. --- scripts/snapdiff.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/snapdiff.py b/scripts/snapdiff.py index b7bad72..ddc2bf7 100755 --- a/scripts/snapdiff.py +++ b/scripts/snapdiff.py @@ -121,10 +121,11 @@ def surface(html, image): def is_image(path): - return \ - path.endswith('.png') \ - and not path.endswith('.diff.png') \ - and not path.endswith('.thumb.png') + name = os.path.basename(path) + name, ext1 = os.path.splitext(name) + name, ext2 = os.path.splitext(name) + print name, ext1, ext2 + return ext1 in ('.png', '.bmp') and ext2 not in ('.diff', '.thumb') def find_images(prefix): -- 2.7.4