# Use PIL (pillow) to save some image metadata
from PIL import Image
from PIL import PngImagePlugin

# inserts metadata e.g.: {"version":"1.0", "author":"nicolai"}
def addMetaData(path, data):
	img = Image.open(path)
	meta = PngImagePlugin.PngInfo()

	for x in data:
		meta.add_text(x, data[x])
		img.save(path, "png", pnginfo=meta)

def getMetaData(path):
	img= Image.open(path)
	return img.info

1158b858429192e579ddb676b71c181a5799552e
<mask token>

<mask token>


def getMetaData(path):
    img = Image.open(path)
    return img.info

<mask token>


def addMetaData(path, data):
    img = Image.open(path)
    meta = PngImagePlugin.PngInfo()
    for x in data:
        meta.add_text(x, data[x])
        img.save(path, 'png', pnginfo=meta)


def getMetaData(path):
    img = Image.open(path)
    return img.info

from PIL import Image
from PIL import PngImagePlugin


def addMetaData(path, data):
    img = Image.open(path)
    meta = PngImagePlugin.PngInfo()
    for x in data:
        meta.add_text(x, data[x])
        img.save(path, 'png', pnginfo=meta)


def getMetaData(path):
    img = Image.open(path)
    return img.info

# Use PIL (pillow) to save some image metadata
from PIL import Image
from PIL import PngImagePlugin

# inserts metadata e.g.: {"version":"1.0", "author":"nicolai"}
def addMetaData(path, data):
	img = Image.open(path)
	meta = PngImagePlugin.PngInfo()

	for x in data:
		meta.add_text(x, data[x])
		img.save(path, "png", pnginfo=meta)

def getMetaData(path):
	img= Image.open(path)
	return img.info
