mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +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")
|
||||
else:
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user