mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-05 00:13:42 +03:00
Use LAB hopper file if conversion is not supported
This commit is contained in:
parent
eee633cb21
commit
745eb23a87
|
@ -273,7 +273,14 @@ def _cached_hopper(mode: str) -> Image.Image:
|
||||||
im = hopper("L")
|
im = hopper("L")
|
||||||
else:
|
else:
|
||||||
im = hopper()
|
im = hopper()
|
||||||
return im.convert(mode)
|
try:
|
||||||
|
im = im.convert(mode)
|
||||||
|
except ImportError:
|
||||||
|
if mode == "LAB":
|
||||||
|
im = Image.open("Tests/images/hopper.Lab.tif")
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
return im
|
||||||
|
|
||||||
|
|
||||||
def djpeg_available() -> bool:
|
def djpeg_available() -> bool:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user