]> git.cworth.org Git - apitrace/blobdiff - scripts/snapdiff.py
snapdiff: Compare .bmp images too.
[apitrace] / scripts / snapdiff.py
index b7bad72336d0e06818c5e1315a7f381c385da7df..ddc2bf7bcc977b0c498e7c58524da976a5ee8835 100755 (executable)
@@ -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):