#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-only # Copyright (C) 2026 Leo Kuroshita (@kurogedelic), Hügelton Instruments # Portions Copyright (C) 2026 Juan Ignacio Antonucci (Juan Jiant) """PPM -> PNG for the UI renders of tests/ui_render.c (Pillow). Under OUTDIR (default build/ui_new): (the STEP page's piano roll scenes, roll_* step chance drum: also in build/ui_roll/_.png) /.png 240 x 240, true size sheet_.png every screen of one palette, 1x, with its name (MENU > STYLE: LINE_/ and sheet_LINE_.png for JIANT CONTRAST HUESO NEON; MENU > LARGE: sheet_LARGE_JIANT.png, sheet_LARGE_CONTRAST.png, sheet_LARGE-LINE_JIANT.png; (MENU > SKIN AIR, 0.9.7 .. V10.7.22: retired, COLORS the one skin)) With SLOTDIR (ui_render.py OUTDIR SLOTDIR): its filmstrips of the rolling digits, SLOTDIR/*.ppm -> *.png. """ import sys from pathlib import Path from PIL import Image, ImageDraw out = Path(sys.argv[1] if len(sys.argv) > 1 else "build/ui_new") shots = {} for f in sorted((out / "ppm").glob("*.ppm")): pal, name = f.stem.split("_", 1) styled = pal in ("LINE", "LARGE", "LARGE-LINE", "AIR") # STYLE / MENU > LARGE / (0.8.9) SKIN renders: