diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py index 6821bca3b..f8cacffbd 100644 --- a/src/PIL/GifImagePlugin.py +++ b/src/PIL/GifImagePlugin.py @@ -141,7 +141,6 @@ class GifImageFile(ImageFile.ImageFile): self.dispose_extent = [0, 0, 0, 0] # x0, y0, x1, y1 self.__frame = -1 self.__fp.seek(self.__rewind) - self._prev_im = None self.disposal_method = 0 else: # ensure that the previous frame was loaded @@ -247,7 +246,7 @@ class GifImageFile(ImageFile.ImageFile): self.tile = [("gif", (x0, y0, x1, y1), self.__offset, - (bits, interlace, -1))] + (bits, interlace, info.get("transparency", -1)))] break else: @@ -290,20 +289,6 @@ class GifImageFile(ImageFile.ImageFile): def tell(self): return self.__frame - def load_end(self): - ImageFile.ImageFile.load_end(self) - - # if the disposal method is 'do not dispose', transparent - # pixels should show the content of the previous frame - if self._prev_im and self.disposal_method == 1: - # we do this by pasting the updated area onto the previous - # frame which we then use as the current image content - updated = self._crop(self.im, self.dispose_extent) - self._prev_im.paste(updated, self.dispose_extent, - updated.convert('RGBA')) - self.im = self._prev_im - self._prev_im = self.im.copy() - def _close__fp(self): try: if self.__fp != self.fp: