OSDN Git Service

bug fixes(4)
[ninix-aya/master.git] / lib / ninix / surface.py
index c5ca79a..01247c5 100644 (file)
@@ -206,14 +206,14 @@ class Surface:
                 else:
                     path = dgp_path
             elements[basename] = [path]
+            w, h = ninix.pix.get_png_size(path)
+            maxwidth = max(maxwidth, w)
+            maxheight = max(maxheight, h)
             match = self.re_surface_id.match(basename)
             if not match:
                 continue
             key = match.group(1)
             surfaces[key] = elements[basename]
-            w, h = ninix.pix.get_png_size(path)
-            maxwidth = max(maxwidth, w)
-            maxheight = max(maxheight, h)
         # compose surface elements
         composite_surface = {}
         for basename, (path, config) in surface.items():