mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-08-25 03:34:10 -05:00
gfx: make sure rectangular images are also divisible into 8x8 tiles
This commit is contained in:
@@ -1211,7 +1211,7 @@ def convert_2bpp_to_png(image, width=0, height=0, pal_file=None):
|
||||
matches = []
|
||||
for w in range(8, num_pixels / 2 + 1, 8):
|
||||
h = num_pixels / w
|
||||
if w * h == num_pixels:
|
||||
if w * h == num_pixels and h % 8 == 0:
|
||||
matches += [(w, h)]
|
||||
# go for the most square image
|
||||
if len(matches):
|
||||
|
||||
Reference in New Issue
Block a user