Don't save screenshots that don't have any useful data on them

This commit is contained in:
Kuba Orlik 2022-07-08 15:12:51 +02:00
parent 66e468bc31
commit 170dcf652f

View File

@ -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":