Exemple #1
0
 def replace_wmf(self, name):
     if self.opts.ignore_wmf:
         os.remove(name)
         return '__REMOVE_ME__'
     from calibre.ebooks.covers import message_image
     if self.default_img is None:
         self.default_img = message_image('Conversion of WMF images is not supported.'
         ' Use Microsoft Word or OpenOffice to save this RTF file'
         ' as HTML and convert that in calibre.')
     name = name.replace('.wmf', '.jpg')
     with lopen(name, 'wb') as f:
         f.write(self.default_img)
     return name
Exemple #2
0
 def replace_wmf(self, name):
     if self.opts.ignore_wmf:
         os.remove(name)
         return '__REMOVE_ME__'
     from calibre.ebooks.covers import message_image
     if self.default_img is None:
         self.default_img = message_image('Conversion of WMF images is not supported.',
         ' Use Microsoft Word or OpenOffice to save this RTF file'
         ' as HTML and convert that in calibre.')
     name = name.replace('.wmf', '.jpg')
     with lopen(name, 'wb') as f:
         f.write(self.default_img)
     return name