From 439bdc79c2b2a7a623cf8f3e3f305b35e76b54fc Mon Sep 17 00:00:00 2001 From: John Schember Date: Sat, 1 Jan 2011 10:20:33 -0500 Subject: [PATCH] FB2 Output: Fix bug #8142, jpg image data not being written to file. --- src/calibre/ebooks/fb2/fb2ml.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/fb2/fb2ml.py b/src/calibre/ebooks/fb2/fb2ml.py index 90c88c3cd0..f9ce9befb4 100644 --- a/src/calibre/ebooks/fb2/fb2ml.py +++ b/src/calibre/ebooks/fb2/fb2ml.py @@ -200,8 +200,10 @@ class FB2MLizer(object): im = Image() im.load(item.data) im.set_compression_quality(70) - data = im.export('jpg') - raw_data = b64encode(data) + imdata = im.export('jpg') + raw_data = b64encode(imdata) + else: + raw_data = b64encode(item.data) # Don't put the encoded image on a single line. data = '' col = 1