Get rid of ImageMagick from the db backend

This commit is contained in:
Kovid Goyal 2016-05-04 17:43:38 +05:30
parent 65b30cdad0
commit bf7effcfe3

View file

@ -30,7 +30,7 @@
is_case_sensitive, samefile, hardlink_file, ascii_filename,
WindowsAtomicFolderMove, atomic_rename, remove_dir_if_empty,
copytree_using_links, copyfile_using_links)
from calibre.utils.magick.draw import save_cover_data_to
from calibre.utils.img import save_cover_data_to
from calibre.utils.formatter_functions import load_user_template_functions
from calibre.db.tables import (OneToOneTable, ManyToOneTable, ManyToManyTable,
SizeTable, FormatsTable, AuthorsTable, IdentifiersTable, PathTable,
@ -1376,7 +1376,7 @@ def set_cover(self, book_id, path, data, no_processing=False):
os.remove(path)
else:
if no_processing:
with open(path, 'wb') as f:
with lopen(path, 'wb') as f:
f.write(data)
else:
try: