From: José Fonseca Date: Tue, 13 Dec 2011 15:53:49 +0000 (+0000) Subject: snapdiff: Compare .bmp images too. X-Git-Tag: 2.0_alpha^2~381 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63f084795b6d0a10d1f4daef45cc54e88c8acac9;p=tools%2Fapitrace.git snapdiff: Compare .bmp images too. Quite common too. --- 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):