# Spearfish: the user's red lines of 2026-10-20 laid over renders of the rebuilt model framed like their screenshots # (plain Python + Pillow). previews/user_views/cmp_side.png, cmp_front.png. import os import numpy as np from PIL import Image HERE = os.path.dirname(os.path.abspath(__file__)) REF = os.path.join(os.path.dirname(HERE), "reference") D = os.path.join(os.path.dirname(HERE), "previews", "user_views") for name, src in (("side", "user_canopy_side_2026-10-20.webp"), ("front", "user_canopy_front_2026-10-20.png")): shot = np.asarray(Image.open(os.path.join(REF, src)).convert("RGB")).astype(int) red = (shot[..., 0] > 170) & (shot[..., 1] < 90) & (shot[..., 2] < 90) red[418:427, :] = red[418:427, :] & False if name == "front" else red[418:427, :] # the viewport's red X axis line r = np.asarray(Image.open(os.path.join(D, "r_%s.png" % name)).convert("RGB")).copy() h = min(r.shape[0], red.shape[0]); w = min(r.shape[1], red.shape[1]) m = red[:h, :w] r[:h, :w][m] = (235, 25, 25) Image.fromarray(r).save(os.path.join(D, "cmp_%s.png" % name)) print("ok")