Created
July 12, 2018 08:08
-
-
Save ghandic/ea06c97eab8b4fdb2f5b295c6949debc to your computer and use it in GitHub Desktop.
Save image as png with metadata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
from PIL.PngImagePlugin import PngInfo | |
im = Image.open('example.png') | |
im_info = PngInfo() | |
im_info.add_text('Key Information', 'Value Information') | |
im.save('example.png', pnginfo=im_info) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment