From 432677740d01996fe0e606a7616923699a4cb3bd Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 23 Oct 2018 22:34:29 -0500 Subject: [PATCH] Add a test for an image that works with other GIF decoders. This test is fixed by the next commits. --- Tests/images/transparent_dispose.gif | Bin 0 -> 95 bytes Tests/test_file_gif.py | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100644 Tests/images/transparent_dispose.gif diff --git a/Tests/images/transparent_dispose.gif b/Tests/images/transparent_dispose.gif new file mode 100644 index 0000000000000000000000000000000000000000..92b615543de7a4c82a3a3449e27b81d8efa7d4fe GIT binary patch literal 95 zcmZ?wbhEHbWM*Jwn8?7u@LvLmfiw^({$ye0Vqjv>0dYX`3`|TRAs}H+BQ)Wb0I+JX PFi;&(Em*Y=BZD;nY>Eoh literal 0 HcmV?d00001 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: