from PIL import Image, ImageDraw
R = "raw/uishot_gfx_%s.png"
tiles = [("traces", (400, 300, 1200, 750)), ("photo", None), ("cit_jour", None), ("cit_soir", None),
         ("cit_nuit", None), ("lune", None), ("feu", None), ("lampe_ombre", None)]
s = Image.new("RGB", (1600, 1800)); d = ImageDraw.Draw(s)
for i, (n, box) in enumerate(tiles):
    im = Image.open(R % n).convert("RGB")
    im = im.crop(box) if box else im.resize((800, 450), Image.LANCZOS)
    x, y = (i % 2) * 800, (i // 2) * 450
    s.paste(im, (x, y)); d.rectangle((x, y, x + 200, y + 22), fill=(0, 0, 0)); d.text((x + 6, y + 5), n, fill=(255, 255, 255))
s.save("check3.jpg", quality=88)
Image.open(R % "photo").convert("RGB").crop((300, 0, 1300, 60)).save("photo_hud.png")
