From 52971b9a2180ca3a54eb25ab49773e818cb8ae15 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sat, 5 Oct 2024 20:19:56 +0200 Subject: more debugging fiddled messages being ignored --- experiments/conv/makefile | 5 ++++- experiments/conv/png2pc | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'experiments') diff --git a/experiments/conv/makefile b/experiments/conv/makefile index ae2f70d..2a513c0 100644 --- a/experiments/conv/makefile +++ b/experiments/conv/makefile @@ -1,5 +1,8 @@ %.png: %.bin - ./pc2png $< + venv/bin/python3 pc2png $< + +%.bin: %.png + venv/bin/python3 png2pc $< %.h: %.bin ./bin2h $< > $@ diff --git a/experiments/conv/png2pc b/experiments/conv/png2pc index d1eaab8..21b3b29 100755 --- a/experiments/conv/png2pc +++ b/experiments/conv/png2pc @@ -1,7 +1,7 @@ #!/bin/python3 import itertools import io -from PIL import Image +from PIL import Image, ImageDraw from consts import * from shared import main @@ -37,6 +37,11 @@ def png2pc(data): img = img.convert('RGB') img = img.quantize(palette=palette_img) + draw = ImageDraw.Draw(img) + draw.rectangle(((0, 0), (24, img.height)), fill=0) + draw.rectangle(((252, 0), (256, img.height)), fill=0) + draw.rectangle(((24, 0), (79, 16)), fill=0) + output = b"" for tile_idx in range(tile_count): tile = ( -- cgit v1.2.3