From 7443e6d36beec01674e36e6ee11424cbb0e8786e Mon Sep 17 00:00:00 2001 From: Riley Lahd Date: Tue, 9 Apr 2019 08:23:59 -0600 Subject: [PATCH] Clean up disposal flag check --- src/PIL/GifImagePlugin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py index 64ef63b2e..4f4e62d6d 100644 --- a/src/PIL/GifImagePlugin.py +++ b/src/PIL/GifImagePlugin.py @@ -444,8 +444,7 @@ def _write_multiple_frames(im, fp, palette): if im_frames: # delta frame previous = im_frames[-1] - if "disposal" in encoderinfo \ - and encoderinfo["disposal"] == 2: + if disposal == 2: base_image = background else: base_image = previous["im"]