Skip to content

Commit 0b3e4a4

Browse files
committed
use pillow-jxl-plugin for JXL if available
1 parent 1cd05de commit 0b3e4a4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

comiclib/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
import PIL
1212
from PIL import Image
1313
try:
14-
from jxlpy import JXLImagePlugin
14+
import pillow_jxl
1515
except ModuleNotFoundError:
16-
pass
16+
try:
17+
from jxlpy import JXLImagePlugin
18+
except ModuleNotFoundError:
19+
pass
1720

1821
import logging
1922
logger = logging.getLogger(__name__)

0 commit comments

Comments
 (0)