Merge pull request #7979 from radarhere/lab

This commit is contained in:
Hugo van Kemenade 2024-04-26 16:46:21 +03:00 committed by GitHub
commit a8f434f676
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -304,7 +304,13 @@ def _cached_hopper(mode: str) -> Image.Image:
with pytest.warns(DeprecationWarning):
im = im.convert(mode)
else:
im = 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