mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +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
|
# replace with background colour
|
||||||
Image._decompression_bomb_check(self.size)
|
Image._decompression_bomb_check(self.size)
|
||||||
self.dispose = Image.core.fill("P", self.size, self.info["background"])
|
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:
|
else:
|
||||||
# replace with previous contents
|
# replace with previous contents
|
||||||
if self.im:
|
if self.im:
|
||||||
self.dispose = self.im.copy()
|
# only dispose the extent in this frame
|
||||||
|
self.dispose = self._crop(self.im, self.dispose_extent)
|
||||||
# only dispose the extent in this frame
|
|
||||||
if self.dispose:
|
|
||||||
self.dispose = self._crop(self.dispose, self.dispose_extent)
|
|
||||||
except (AttributeError, KeyError):
|
except (AttributeError, KeyError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user