mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Delay load PIL
This commit is contained in:
parent
a25c767de3
commit
de74967e9d
@ -15,7 +15,6 @@ from io import BytesIO
|
|||||||
from textwrap import wrap
|
from textwrap import wrap
|
||||||
from threading import Event, Thread
|
from threading import Event, Thread
|
||||||
|
|
||||||
from PIL import Image
|
|
||||||
from qt.core import (
|
from qt.core import (
|
||||||
QAbstractItemView,
|
QAbstractItemView,
|
||||||
QApplication,
|
QApplication,
|
||||||
@ -1017,6 +1016,7 @@ class GridView(QListView):
|
|||||||
as_what='pil_image')
|
as_what='pil_image')
|
||||||
if has_cover:
|
if has_cover:
|
||||||
if tcdata is None:
|
if tcdata is None:
|
||||||
|
from PIL import Image
|
||||||
# The cached cover is up-to-date. Convert the cached bytes
|
# The cached cover is up-to-date. Convert the cached bytes
|
||||||
# to a PIL image
|
# to a PIL image
|
||||||
cache_valid = True
|
cache_valid = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user