mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 20:27:06 +03:00
Allow correct delta generation for GIFs with disposal 2 (Fixes #3665)
This commit is contained in:
parent
22ae782320
commit
ae194096d0
|
@ -443,7 +443,10 @@ def _write_multiple_frames(im, fp, palette):
|
||||||
if im_frames:
|
if im_frames:
|
||||||
# delta frame
|
# delta frame
|
||||||
previous = im_frames[-1]
|
previous = im_frames[-1]
|
||||||
if _get_palette_bytes(im_frame) == \
|
if encoderinfo["disposal"] == 2:
|
||||||
|
# If diposing whole frame, treat full new frame as delta
|
||||||
|
delta = im_frame
|
||||||
|
elif _get_palette_bytes(im_frame) == \
|
||||||
_get_palette_bytes(previous['im']):
|
_get_palette_bytes(previous['im']):
|
||||||
delta = ImageChops.subtract_modulo(im_frame,
|
delta = ImageChops.subtract_modulo(im_frame,
|
||||||
previous['im'])
|
previous['im'])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user