mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1654:
- Convert image format to full-color when forcing large-pixel area lossless image formats to JPEG
This commit is contained in:
parent
d321b77930
commit
48340fe6ef
@ -364,7 +364,11 @@ class MobiWriter(object):
|
||||
if image.format not in ('JPEG', 'GIF'):
|
||||
width, height = image.size
|
||||
area = width * height
|
||||
format = 'GIF' if area <= 40000 else 'JPEG'
|
||||
if area <= 40000:
|
||||
format = 'GIF'
|
||||
else:
|
||||
image = image.convert('RGBA')
|
||||
format = 'JPEG'
|
||||
changed = True
|
||||
if dimen is not None:
|
||||
image.thumbnail(dimen, Image.ANTIALIAS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user