Pillow icon indicating copy to clipboard operation
Pillow copied to clipboard

Restore original encoderinfo after saving

Open radarhere opened this issue 7 months ago • 0 comments

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.

radarhere avatar May 02 '25 15:05 radarhere