File size: 354 Bytes
911c66e
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import os
from PIL import Image

char_dir = "static/characters"
for f in os.listdir(char_dir):
    if f.endswith(".png"):
        path = os.path.join(char_dir, f)
        try:
            with Image.open(path) as img:
                print(f"{f}: {img.size}, mode: {img.mode}")
        except Exception as e:
            print(f"Error opening {f}: {e}")