Use im.info background when saving

This commit is contained in:
Andrew Murray 2018-11-20 18:50:00 +11:00
parent 50d49d619b
commit 84df069169

View File

@ -191,7 +191,11 @@ def _save_all(im, fp, filename):
_save(im, fp, filename)
return
background = encoderinfo.get("background", (0, 0, 0, 0))
background = (0, 0, 0, 0)
if "background" in encoderinfo:
background = encoderinfo["background"]
elif "background" in im.info:
background = im.info["background"]
duration = im.encoderinfo.get("duration", 0)
loop = im.encoderinfo.get("loop", 0)
minimize_size = im.encoderinfo.get("minimize_size", False)