From 170dcf652f93d8055f9c8e6b24d59cff47523f70 Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Fri, 8 Jul 2022 15:12:51 +0200 Subject: [PATCH] Don't save screenshots that don't have any useful data on them --- Docker/annotate_header.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Docker/annotate_header.py b/Docker/annotate_header.py index 6bcca04..95f442b 100644 --- a/Docker/annotate_header.py +++ b/Docker/annotate_header.py @@ -105,6 +105,8 @@ with Image.open(output_file) as im: anchor="rm", font=font, ) + if len(found_needles) == 0: + exit(0) im = im.resize((im.width // 2, im.height // 2)) im.save(output_file, "PNG") print(json.dumps({"new_file":