Add tests for 4-bit RLE decoder

This commit is contained in:
Nathanael Gentry 2022-10-21 19:45:05 -04:00
parent 70e3e4fb10
commit c2e9c66fcd
3 changed files with 7 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -175,6 +175,13 @@ def test_rle8():
with pytest.raises(ValueError):
im.load()
def test_rle4():
with Image.open("Tests/images/hopper_rle4.bmp") as im:
assert_image_similar_tofile(im, "Tests/images/hopper_4bit.bmp", 12)
with Image.open("Tests/images/bmp/g/pal4rle.bmp") as im:
assert_image_similar_tofile(im, "Tests/images/bmp/g/pal4.bmp", 12)
@pytest.mark.parametrize(
"file_name,length",