mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
using the decompression bomb _crop filter
This commit is contained in:
parent
c70977aad7
commit
228c5bb292
|
@ -257,7 +257,7 @@ class GifImageFile(ImageFile.ImageFile):
|
|||
|
||||
# only dispose the extent in this frame
|
||||
if self.dispose:
|
||||
self.dispose = self.dispose.crop(self.dispose_extent)
|
||||
self.dispose = self._crop(self.dispose, self.dispose_extent)
|
||||
except (AttributeError, KeyError):
|
||||
pass
|
||||
|
||||
|
@ -280,7 +280,7 @@ class GifImageFile(ImageFile.ImageFile):
|
|||
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.im.crop(self.dispose_extent)
|
||||
updated = self._crop(self.im, self.dispose_extent)
|
||||
self._prev_im.paste(updated, self.dispose_extent,
|
||||
updated.convert('RGBA'))
|
||||
self.im = self._prev_im
|
||||
|
|
Loading…
Reference in New Issue
Block a user