Project_WL/AgentScripts/WL816o_img.py

39 lines
1.4 KiB
Python
Raw Normal View History

# WL-816o — 캡처 합성 (같은 높이로 맞춰 나란히)
import os
from PIL import Image, ImageDraw
BASE = r"E:\NerdNavis\WL_wt\gameplay\Screenshots_WL"
OUT = os.path.join(BASE, "WL816o")
os.makedirs(OUT, exist_ok=True)
def strip(items, out, h=900, gap=10):
ims = []
for path, label in items:
if not os.path.exists(path):
print("MISSING", path)
return
im = Image.open(path).convert("RGB")
w = int(im.width * h / im.height)
ims.append((im.resize((w, h), Image.LANCZOS), label))
W = sum(i.width for i, _ in ims) + gap * (len(ims) - 1)
canvas = Image.new("RGB", (W, h + 34), (24, 24, 24))
d = ImageDraw.Draw(canvas)
x = 0
for im, label in ims:
canvas.paste(im, (x, 34))
d.text((x + 8, 10), label, fill=(255, 255, 255))
x += im.width + gap
canvas.save(out)
print("wrote", out, canvas.size)
strip([(os.path.join(BASE, "WL816n", "demo_A_baseline.png"), "DEMO (3DPixelArt)"),
(os.path.join(OUT, "a_before.png"), "BEFORE = 816n (uniform grid)"),
(os.path.join(OUT, "b_after.png"), "AFTER = 816o (cloud-edge only)")],
os.path.join(OUT, "a_demo_vs_before_after.png"), h=900)
strip([(os.path.join(OUT, "t_before.png"), "TOP BEFORE (uniform grid)"),
(os.path.join(OUT, "t_after.png"), "TOP AFTER (cloud-edge only)")],
os.path.join(OUT, "c_top_before_after.png"), h=768)