From 6de405929156b9a7cd5e03f6ceb2583e87dac63c Mon Sep 17 00:00:00 2001 From: lm Date: Sun, 19 Oct 2025 21:09:26 +0200 Subject: [PATCH] Respect excluded regions in overlay rendering --- app/qt/image_processor.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/qt/image_processor.py b/app/qt/image_processor.py index dc9e834..6164494 100644 --- a/app/qt/image_processor.py +++ b/app/qt/image_processor.py @@ -154,19 +154,20 @@ class QtImageProcessor: r, g, b, a = pixels[x, y] if a == 0: continue + match = self._matches(r, g, b) excluded = bool(mask_px and mask_px[x, y]) total_all += 1 - if self._matches(r, g, b): - draw.point((x, y), fill=highlight) - matches_all += 1 if excluded: total_excl += 1 - if self._matches(r, g, b): + if match: matches_excl += 1 else: total_keep += 1 - if self._matches(r, g, b): + if match: + draw.point((x, y), fill=highlight) matches_keep += 1 + if match: + matches_all += 1 self.overlay_img = overlay self.stats = Stats(