mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'MasterPlexus-png-news-compression' of https://github.com/MasterPlexus/calibre
This commit is contained in:
commit
00d4214857
@ -460,7 +460,7 @@ class RecursiveFetcher:
|
|||||||
if itype not in {'png', 'jpg', 'jpeg'}:
|
if itype not in {'png', 'jpg', 'jpeg'}:
|
||||||
itype = 'png' if itype == 'gif' else 'jpeg'
|
itype = 'png' if itype == 'gif' else 'jpeg'
|
||||||
data = image_to_data(img, fmt=itype)
|
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:
|
try:
|
||||||
data = self.rescale_image(data)
|
data = self.rescale_image(data)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user