mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
test libtiff with webp compression
This commit is contained in:
parent
a7df33551c
commit
ffedfe034a
BIN
Tests/images/hopper_webp.png
Normal file
BIN
Tests/images/hopper_webp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
Tests/images/hopper_webp.tif
Normal file
BIN
Tests/images/hopper_webp.tif
Normal file
Binary file not shown.
|
@ -846,6 +846,19 @@ class TestFileLibTiff(LibTiffTestCase):
|
||||||
pytest.skip("LZMA compression support is not configured")
|
pytest.skip("LZMA compression support is not configured")
|
||||||
raise
|
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):
|
def test_lzw(self):
|
||||||
with Image.open("Tests/images/hopper_lzw.tif") as im:
|
with Image.open("Tests/images/hopper_lzw.tif") as im:
|
||||||
assert im.mode == "RGB"
|
assert im.mode == "RGB"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user