mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
_crop already makes a copy of the image
This commit is contained in:
parent
f91f93e246
commit
16dbffc3a8
|
@ -267,14 +267,15 @@ class GifImageFile(ImageFile.ImageFile):
|
|||
# replace with background colour
|
||||
Image._decompression_bomb_check(self.size)
|
||||
self.dispose = Image.core.fill("P", self.size, self.info["background"])
|
||||
|
||||
# only dispose the extent in this frame
|
||||
if self.dispose:
|
||||
self.dispose = self._crop(self.dispose, self.dispose_extent)
|
||||
else:
|
||||
# replace with previous contents
|
||||
if self.im:
|
||||
self.dispose = self.im.copy()
|
||||
|
||||
# only dispose the extent in this frame
|
||||
if self.dispose:
|
||||
self.dispose = self._crop(self.dispose, self.dispose_extent)
|
||||
# only dispose the extent in this frame
|
||||
self.dispose = self._crop(self.im, self.dispose_extent)
|
||||
except (AttributeError, KeyError):
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user