mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Add a test for an image that works with other GIF decoders.
This test is fixed by the next commits.
This commit is contained in:
parent
5b4cb5052a
commit
432677740d
BIN
Tests/images/transparent_dispose.gif
Normal file
BIN
Tests/images/transparent_dispose.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 95 B |
|
@ -337,6 +337,17 @@ def test_dispose_background():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def test_transparent_dispose():
|
||||||
|
img = Image.open("Tests/images/transparent_dispose.gif")
|
||||||
|
|
||||||
|
expected_colors = [(2, 1, 2), (0, 1, 0), (2, 1, 2)]
|
||||||
|
for frame in range(3):
|
||||||
|
img.seek(frame)
|
||||||
|
for x in range(3):
|
||||||
|
color = img.getpixel((x, 0))
|
||||||
|
assert color == expected_colors[frame][x]
|
||||||
|
|
||||||
|
|
||||||
def test_dispose_previous():
|
def test_dispose_previous():
|
||||||
with Image.open("Tests/images/dispose_prev.gif") as img:
|
with Image.open("Tests/images/dispose_prev.gif") as img:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user