How to use the pyexiv2.ImageMetadata.__setitem__ function in pyexiv2

To help you get started, we’ve selected a few pyexiv2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spillz / picty / modules / picty / metadata / metadata2.py View on Github external
def __setitem__(self,key,value):
        try:
            pyexiv2.ImageMetadata.__setitem__(self,key,value)
        except TypeError:
            if key.startswith('Exif'):
                value=pyexiv2.ExifTag(key,value)
            elif key.startswith('Iptc'):
                value=pyexiv2.IptcTag(key,value)
            elif key.startswith('Xmp'):
                value=pyexiv2.XmpTag(key,value)
            pyexiv2.ImageMetadata.__setitem__(self,key,value)
github spillz / picty / modules / picty / metadata / metadata2.py View on Github external
def __setitem__(self,key,value):
        try:
            pyexiv2.ImageMetadata.__setitem__(self,key,value)
        except TypeError:
            if key.startswith('Exif'):
                value=pyexiv2.ExifTag(key,value)
            elif key.startswith('Iptc'):
                value=pyexiv2.IptcTag(key,value)
            elif key.startswith('Xmp'):
                value=pyexiv2.XmpTag(key,value)
            pyexiv2.ImageMetadata.__setitem__(self,key,value)