From 24afcc621e2204850d2d1ee4f9fe6cd7d8255707 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 13 Mar 2012 17:00:02 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/mobi/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/mobi/utils.py b/src/calibre/ebooks/mobi/utils.py index 2951931e30..3a9cf1c0ba 100644 --- a/src/calibre/ebooks/mobi/utils.py +++ b/src/calibre/ebooks/mobi/utils.py @@ -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