Skip to content

Commit

Permalink
Simplified code
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 25, 2023
1 parent c855584 commit f59b51f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PIL/GifImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def _save(im, fp, filename, save_all=False):
palette = im.encoderinfo.get("palette", im.info.get("palette"))
else:
palette = None
im.encoderinfo["optimize"] = im.encoderinfo.get("optimize", True)
im.encoderinfo.setdefault("optimize", True)

if not save_all or not _write_multiple_frames(im, fp, palette):
_write_single_frame(im, fp, palette)
Expand Down

0 comments on commit f59b51f

Please sign in to comment.