mirror of
https://github.com/janeczku/calibre-web.git
synced 2025-01-08 04:04:09 +02:00
Merge remote-tracking branch 'colorspace/fix-colorspace-transformation'
This commit is contained in:
commit
0ef9e46133
@ -36,7 +36,7 @@ def cover_processing(tmp_file_path, img, extension):
|
||||
if use_IM:
|
||||
with Image(blob=img) as imgc:
|
||||
imgc.format = 'jpeg'
|
||||
imgc.transform_colorspace('rgb')
|
||||
imgc.transform_colorspace('srgb')
|
||||
imgc.save(filename=tmp_cover_name)
|
||||
return tmp_cover_name
|
||||
else:
|
||||
|
@ -905,7 +905,7 @@ def save_cover(img, book_path):
|
||||
else:
|
||||
imgc = Image(blob=io.BytesIO(img.content))
|
||||
imgc.format = 'jpeg'
|
||||
imgc.transform_colorspace("rgb")
|
||||
imgc.transform_colorspace("srgb")
|
||||
img = imgc
|
||||
except (BlobError, MissingDelegateError):
|
||||
log.error("Invalid cover file content")
|
||||
|
Loading…
Reference in New Issue
Block a user