mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 09:56:17 +03:00
Save comments from any image format by default
This commit is contained in:
parent
e9f4858491
commit
976ad5746a
|
@ -714,9 +714,7 @@ def _save(im, fp, filename):
|
|||
|
||||
extra = info.get("extra", b"")
|
||||
|
||||
comment = info.get("comment")
|
||||
if comment is None and isinstance(im, JpegImageFile):
|
||||
comment = im.app.get("COM")
|
||||
comment = info.get("comment", im.info.get("comment"))
|
||||
if comment:
|
||||
if isinstance(comment, str):
|
||||
comment = comment.encode()
|
||||
|
|
Loading…
Reference in New Issue
Block a user