1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-19 12:43:35 +02:00

Enable mobi write support.

This commit is contained in:
2020-04-13 15:25:19 +02:00
parent 32b86ab224
commit a4533957f7
15 changed files with 77 additions and 90 deletions

View File

@@ -175,9 +175,9 @@ def rescale_image(data, maxsizeb=IMAGE_MAX_SIZE, dimen=None):
else:
width = height = dimen
data = scale_image(data, width=width, height=height, compression_quality=90)[-1]
else:
# else:
# Replace transparent pixels with white pixels and convert to JPEG
data = save_cover_data_to(data)
#data = save_cover_data_to(data)
if len(data) <= maxsizeb:
return data
orig_data = data # save it in case compression fails