from PIL import Image
import glob
import os

tpl = Image.open("captures/traverse_modal_crop.png")
tw, th = tpl.size
print(f"Template size: {tw}x{th}")

candidates = []
for f in sorted(glob.glob("captures/*.png")):
    base = os.path.basename(f)
    if any(k in base.lower() for k in ["102457", "102100", "traverse", "after_click"]):
        candidates.append(f)

print(f"Found candidates: {candidates}")

for c in candidates:
    try:
        im = Image.open(c)
        print(f"{c}: {im.size}")
    except Exception as e:
        print(f"Error {c}: {e}")
