mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Avoid unnecessary creation of QApplication when running image rescaling in the conversion pipeline
This commit is contained in:
parent
ffc0dcd836
commit
5d8d9a794b
1 changed files with 2 additions and 6 deletions
|
|
@ -17,10 +17,9 @@ def __init__(self, check_colorspaces=False):
|
|||
|
||||
def __call__(self, oeb, opts):
|
||||
self.oeb, self.opts, self.log = oeb, opts, oeb.log
|
||||
from calibre.gui2 import is_ok_to_use_qt
|
||||
self.rescale(qt=is_ok_to_use_qt())
|
||||
self.rescale()
|
||||
|
||||
def rescale(self, qt=True):
|
||||
def rescale(self):
|
||||
from calibre.utils.magick.draw import Image
|
||||
|
||||
is_image_collection = getattr(self.opts, 'is_image_collection', False)
|
||||
|
|
@ -91,6 +90,3 @@ def rescale(self, qt=True):
|
|||
else:
|
||||
item.data = data
|
||||
item.unload_data_from_memory()
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue