mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
61fddc54fb
commit
24afcc621e
@ -366,8 +366,11 @@ def to_base(num, base=32):
|
||||
def mobify_image(data):
|
||||
'Convert PNG images to GIF as the idiotic Kindle cannot display some PNG'
|
||||
what = imghdr.what(None, data)
|
||||
|
||||
if what == 'png':
|
||||
data = save_cover_data_to(data, 'img.gif', return_data=True)
|
||||
im = Image()
|
||||
im.load(data)
|
||||
data = im.export('gif')
|
||||
return data
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user