Skip to content

Commit

Permalink
Palette is unneeded as RGB to P conversion will not occur
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Oct 2, 2023
1 parent b98dc8a commit c9ba107
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/PIL/PngImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,10 +1104,7 @@ def _write_multiple_frames(im, fp, chunk, rawmode, default_image, append_images)
if im_frame.mode == rawmode:
im_frame = im_frame.copy()
else:
if rawmode == "P":
im_frame = im_frame.convert(rawmode, palette=im.palette)
else:
im_frame = im_frame.convert(rawmode)
im_frame = im_frame.convert(rawmode)
encoderinfo = im.encoderinfo.copy()
if isinstance(duration, (list, tuple)):
encoderinfo["duration"] = duration[frame_count]
Expand Down

0 comments on commit c9ba107

Please sign in to comment.