diff --git a/Tests/images/transparent_dispose.gif b/Tests/images/transparent_dispose.gif new file mode 100644 index 000000000..92b615543 Binary files /dev/null and b/Tests/images/transparent_dispose.gif differ diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index 556ecec6b..9267fb567 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -337,6 +337,17 @@ def test_dispose_background(): 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(): with Image.open("Tests/images/dispose_prev.gif") as img: try: