From cef6ee1a93511559bf0ef5f344c74ffccee9dec9 Mon Sep 17 00:00:00 2001 From: MasterPlexus Date: Fri, 8 Nov 2024 21:37:00 +0100 Subject: [PATCH] add png in simple.py for copress_news_images by adding png for copression the size of some magazines will be decreased up to 10 times. worked for me well, so I wanted to provide the setting for all. --- src/calibre/web/fetch/simple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/web/fetch/simple.py b/src/calibre/web/fetch/simple.py index 55a80395b3..8c3884a66b 100644 --- a/src/calibre/web/fetch/simple.py +++ b/src/calibre/web/fetch/simple.py @@ -460,7 +460,7 @@ class RecursiveFetcher: if itype not in {'png', 'jpg', 'jpeg'}: itype = 'png' if itype == 'gif' else 'jpeg' data = image_to_data(img, fmt=itype) - if self.compress_news_images and itype in {'jpg','jpeg'}: + if self.compress_news_images and itype in {'png','jpg','jpeg'}: try: data = self.rescale_image(data) except Exception: