mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Cleanup previous PR
This commit is contained in:
parent
00d4214857
commit
8eb9e37d99
@ -366,11 +366,12 @@ class BasicNewsRecipe(Recipe):
|
||||
ignore_duplicate_articles = None
|
||||
|
||||
# The following parameters control how the recipe attempts to minimize
|
||||
# JPEG image sizes
|
||||
# image sizes. Note that if compression is enabled PNG images are converted
|
||||
# to JPEG.
|
||||
|
||||
#: Set this to False to ignore all scaling and compression parameters and
|
||||
#: pass images through unmodified. If True and the other compression
|
||||
#: parameters are left at their default values, JPEG images will be scaled to fit
|
||||
#: parameters are left at their default values, images will be scaled to fit
|
||||
#: in the screen dimensions set by the output profile and compressed to size at
|
||||
#: most (w * h)/16 where w x h are the scaled image dimensions.
|
||||
compress_news_images = False
|
||||
|
@ -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 {'png','jpg','jpeg'}:
|
||||
if self.compress_news_images:
|
||||
try:
|
||||
data = self.rescale_image(data)
|
||||
except Exception:
|
||||
|
Loading…
x
Reference in New Issue
Block a user