add assert_mipmap
This commit is contained in:
parent
54df210cf9
commit
12e35fd2a0
15
assert_mipmap.py
Normal file
15
assert_mipmap.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
from PIL import Image
|
||||||
|
import sys
|
||||||
|
from twiddle import npot
|
||||||
|
|
||||||
|
total = 0
|
||||||
|
|
||||||
|
in_files = sys.argv[1:]
|
||||||
|
for in_file in in_files:
|
||||||
|
with Image.open(in_file) as im:
|
||||||
|
width, height = im.size
|
||||||
|
assert npot(width) == npot(width), width
|
||||||
|
assert npot(height) == npot(height), height
|
||||||
|
if width != height:
|
||||||
|
print(width, height, in_file)
|
||||||
|
total += width * height
|
Loading…
x
Reference in New Issue
Block a user