Speed up generation of thumbnails for catalog

This commit is contained in:
Kovid Goyal 2010-01-24 11:34:42 -07:00
parent 6b59d8aa96
commit 0b4de38330

View File

@ -751,6 +751,8 @@ class EPUB_MOBI(CatalogPlugin):
self.generateHTMLByTags()
if getattr(self.reporter, 'cancel_requested', False): return 1
from calibre.utils.PythonMagickWand import ImageMagick
with ImageMagick():
self.generateThumbnails()
if getattr(self.reporter, 'cancel_requested', False): return 1
@ -2343,7 +2345,6 @@ class EPUB_MOBI(CatalogPlugin):
def generateThumbnail(self, title, image_dir, thumb_file):
import calibre.utils.PythonMagickWand as pw
with pw.ImageMagick():
try:
img = pw.NewMagickWand()
if img < 0: