mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Add tests for issue #4142
This commit is contained in:
parent
097f7d0f56
commit
ddd3a2b482
BIN
Tests/images/dxt5-colorblock-alpha-issue-4142.dds
Normal file
BIN
Tests/images/dxt5-colorblock-alpha-issue-4142.dds
Normal file
Binary file not shown.
|
@ -190,6 +190,21 @@ def test_short_file():
|
|||
short_file()
|
||||
|
||||
|
||||
def test_dxt5_colorblock_alpha_issue_4142():
|
||||
""" Check that colorblocks are decoded correctly in DXT5"""
|
||||
|
||||
with Image.open("Tests/images/dxt5-colorblock-alpha-issue-4142.dds") as im:
|
||||
px = im.getpixel((0, 0))
|
||||
assert px[0] != 0
|
||||
assert px[1] != 0
|
||||
assert px[2] != 0
|
||||
|
||||
px = im.getpixel((1, 0))
|
||||
assert px[0] != 0
|
||||
assert px[1] != 0
|
||||
assert px[2] != 0
|
||||
|
||||
|
||||
def test_unimplemented_pixel_format():
|
||||
with pytest.raises(NotImplementedError):
|
||||
Image.open("Tests/images/unimplemented_pixel_format.dds")
|
||||
|
|
Loading…
Reference in New Issue
Block a user