mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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.
This commit is contained in:
parent
37dd0f5c70
commit
cef6ee1a93
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user