Browse Source

fixed atlas generator for transparency frames

dmuratshin 9 years ago
parent
commit
749bcbd342
1 changed files with 9 additions and 1 deletions
  1. 9 1
      tools/resbuild/process_atlas.py

+ 9 - 1
tools/resbuild/process_atlas.py

@@ -18,7 +18,15 @@ from . import process
 
 
 
 
 def isImagesIdentical(im1, im2):
 def isImagesIdentical(im1, im2):
-    return ImageChops.difference(im1, im2).getbbox() is None
+    if im1.size[0] == 0 or im1.size[1] == 0:
+        return False
+    
+    if im2.size[0] == 0 or im2.size[1] == 0:
+        return False    
+
+    bbox = ImageChops.difference(im1, im2).getbbox()
+    r = bbox is None
+    return r
 
 
 def as_int(attr, df=0):
 def as_int(attr, df=0):
     if not attr:
     if not attr: