From f2c71d2a1fe6c58345f01f9d64fd16b02818d970 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 3 Jan 2022 20:30:46 -0300 Subject: [PATCH] Tweak small image detection --- biostools/extractors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biostools/extractors.py b/biostools/extractors.py index 7419c57..d4cc5ee 100644 --- a/biostools/extractors.py +++ b/biostools/extractors.py @@ -631,7 +631,7 @@ class ImageExtractor(Extractor): try: # Don't save image if it's too small. x, y = image.size - if x < 100 or y < 100: + if (x < 100 and y < 100) or x < 25 or y < 25: raise Exception('too small') image.save(image_path)