mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 21:50:54 +03:00
Palette is unneeded as RGB to P conversion will not occur
This commit is contained in:
parent
b98dc8abe1
commit
c9ba107c2c
|
@ -1104,10 +1104,7 @@ def _write_multiple_frames(im, fp, chunk, rawmode, default_image, append_images)
|
||||||
if im_frame.mode == rawmode:
|
if im_frame.mode == rawmode:
|
||||||
im_frame = im_frame.copy()
|
im_frame = im_frame.copy()
|
||||||
else:
|
else:
|
||||||
if rawmode == "P":
|
im_frame = im_frame.convert(rawmode)
|
||||||
im_frame = im_frame.convert(rawmode, palette=im.palette)
|
|
||||||
else:
|
|
||||||
im_frame = im_frame.convert(rawmode)
|
|
||||||
encoderinfo = im.encoderinfo.copy()
|
encoderinfo = im.encoderinfo.copy()
|
||||||
if isinstance(duration, (list, tuple)):
|
if isinstance(duration, (list, tuple)):
|
||||||
encoderinfo["duration"] = duration[frame_count]
|
encoderinfo["duration"] = duration[frame_count]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user