mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2475 (Calibre 0.5.12 Conversion Error)
This commit is contained in:
parent
4b457c1486
commit
a334000e70
@ -650,12 +650,13 @@ class MobiReader(object):
|
||||
image_index += 1
|
||||
try:
|
||||
im = PILImage.open(buf)
|
||||
im = im.convert('RGB')
|
||||
except IOError:
|
||||
continue
|
||||
|
||||
path = os.path.join(output_dir, '%05d.jpg'%image_index)
|
||||
self.image_names.append(os.path.basename(path))
|
||||
im.convert('RGB').save(open(path, 'wb'), format='JPEG')
|
||||
im.save(open(path, 'wb'), format='JPEG')
|
||||
|
||||
def get_metadata(stream):
|
||||
mi = MetaInformation(os.path.basename(stream.name), [_('Unknown')])
|
||||
|
Loading…
x
Reference in New Issue
Block a user