File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 3131API Changes
3232===========
3333
34- TODO
35- ^^^^
34+ Writing XMP bytes to JPEG and MPO
35+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3636
37- TODO
37+ Pillow 11.0.0 added writing XMP data to JPEG and MPO images::
38+
39+ im.info["xmp"] = b"test"
40+ im.save("out.jpg")
41+
42+ However, this meant that XMP data was automatically kept from an opened image,
43+ which is inconsistent with the rest of Pillow's behaviour. This functionality
44+ has been removed. To write XMP data, the ``xmp `` argument can still be used for
45+ JPEG files::
46+
47+ im.save("out.jpg", xmp=b"test")
48+
49+ To save XMP data to the second frame of an MPO image, ``encoderinfo `` can now
50+ be used::
51+
52+ second_im.encoderinfo = {"xmp": b"test"}
53+ im.save("out.mpo", save_all=True, append_images=[second_im])
3854
3955API Additions
4056=============
You can’t perform that action at this time.
0 commit comments