Don't save screenshots that don't have any useful data on them
This commit is contained in:
		
							parent
							
								
									66e468bc31
								
							
						
					
					
						commit
						170dcf652f
					
				| @ -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": | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user