Pillow
Pillow copied to clipboard
Restore original encoderinfo after saving
Resolves #8936
#8483 added a generic way to set additional options when saving subsequent frames.
from PIL import Image
im = Image.open("Tests/images/hopper.png")
second_im = Image.new("RGB", (128, 128))
second_im.encoderinfo = {"xmp": b"Second frame"}
im.save("out.mpo", save_all=True, append_images=[second_im])
In that PR, I deleted the image's encoderinfo at the end of the save process. The user would more likely expect the image's encoderinfo to still hold the same information.