mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-25 14:33:36 +02:00
Fix #2475 (Calibre 0.5.12 Conversion Error)
This commit is contained in:
parent
4b457c1486
commit
a334000e70
1 changed files with 2 additions and 1 deletions
|
|
@ -650,12 +650,13 @@ def extract_images(self, processed_records, output_dir):
|
|||
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…
Reference in a new issue