From e3fbc1a965ab7fa753485ac268916a8639ce909a Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 7 Mar 2023 02:21:12 +0200 Subject: [PATCH] restrict printing to only large size difference --- files/helpers/media.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/media.py b/files/helpers/media.py index 5c381b993..cce2adca1 100644 --- a/files/helpers/media.py +++ b/files/helpers/media.py @@ -199,7 +199,7 @@ def process_image(filename:str, v, resize=0, trim=False, uploader_id:Optional[in return None size_after_conversion = os.stat(filename).st_size - if size_after_conversion > size: + if size_after_conversion - size > 50000: print(STARS, flush=True) print(f'{filename}: {oldformat}@{size} -> WEBP@{size_after_conversion}', flush=True) print(STARS, flush=True)