#!/usr/bin/env python3 """Join an enemy's static_audit front/side/back/perspective captures into sheet.png for review.""" import sys from pathlib import Path from PIL import Image base = Path(__file__).resolve().parents[1] / "Tools/output" d = next(p for p in (base / "enemy_characters" / sys.argv[1] / "static_audit", base / "companions" / sys.argv[1] / "static_audit") if p.exists()) ims = [Image.open(d / f"{v}.png").convert("RGB") for v in ("front", "side", "back", "perspective")] ims = [i.resize((int(i.width * 300 / i.height), 300)) for i in ims] s = Image.new("RGB", (sum(i.width for i in ims), 300), "white"); x = 0 for i in ims: s.paste(i, (x, 0)); x += i.width s.save(d / "sheet.png"); print(d / "sheet.png")