We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16dbffc commit 2f84f63Copy full SHA for 2f84f63
src/PIL/GifImagePlugin.py
@@ -265,12 +265,15 @@ def _seek(self, frame):
265
self.dispose = None
266
elif self.disposal_method == 2:
267
# replace with background colour
268
- Image._decompression_bomb_check(self.size)
269
- self.dispose = Image.core.fill("P", self.size, self.info["background"])
270
271
# only dispose the extent in this frame
272
- if self.dispose:
273
- self.dispose = self._crop(self.dispose, self.dispose_extent)
+ x0, y0, x1, y1 = self.dispose_extent
+ dispose_size = (x1 - x0, y1 - y0)
+
+ Image._decompression_bomb_check(dispose_size)
274
+ self.dispose = Image.core.fill(
275
+ "P", dispose_size, self.info["background"]
276
+ )
277
else:
278
# replace with previous contents
279
if self.im:
0 commit comments