diff --git a/pi/assets/img/idle.png b/pi/assets/img/idle.png index f853294..aa4f85e 100644 Binary files a/pi/assets/img/idle.png and b/pi/assets/img/idle.png differ diff --git a/pi/assets/img/on_alarm.png b/pi/assets/img/on_alarm.png index a7512fc..de8d7bc 100644 Binary files a/pi/assets/img/on_alarm.png and b/pi/assets/img/on_alarm.png differ diff --git a/pi/image_handler.py b/pi/image_handler.py index 3faccb5..3c6bb24 100644 --- a/pi/image_handler.py +++ b/pi/image_handler.py @@ -10,7 +10,7 @@ log = logging.getLogger(__name__) IMG_DIR = Path(__file__).parent / "assets" / "img" STATUS_IMG_SIZE = 120 -MONOCHROME_THRESHOLD = 120 +MONOCHROME_THRESHOLD = 140 def load_status_image(path: Path) -> bytes: @@ -37,7 +37,7 @@ def load_status_image(path: Path) -> bytes: y_off = (STATUS_IMG_SIZE - img.height) // 2 canvas.paste(img, (x_off, y_off)) - # Threshold to 1-bit: black (< 128) -> 1, white -> 0 + # Threshold to 1-bit: black (< MONOCHROME_THRESHOLD) -> 1, white -> 0 bw = canvas.point(lambda p: 1 if p < MONOCHROME_THRESHOLD else 0, "1") raw = bw.tobytes() log.info("Status image loaded: %s -> %d bytes", path.name, len(raw))