test libtiff with webp compression

This commit is contained in:
nulano 2022-09-05 11:58:42 +02:00
parent a7df33551c
commit ffedfe034a
No known key found for this signature in database
GPG Key ID: B650CDF63B705766
3 changed files with 13 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

View File

@ -846,6 +846,19 @@ class TestFileLibTiff(LibTiffTestCase):
pytest.skip("LZMA compression support is not configured")
raise
def test_webp(self, capfd):
try:
with Image.open("Tests/images/hopper_webp.tif") as im:
assert im.mode == "RGB"
assert im.size == (128, 128)
assert im.format == "TIFF"
assert_image_similar_tofile(im, "Tests/images/hopper_webp.png", 1)
except OSError:
captured = capfd.readouterr()
if "WEBP compression support is not configured" in captured.err:
pytest.skip("WEBP compression support is not configured")
raise
def test_lzw(self):
with Image.open("Tests/images/hopper_lzw.tif") as im:
assert im.mode == "RGB"