How to use the exif.InterpretedMakerNotes function in exif

To help you get started, we’ve selected a few exif 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 straup / filtr / utils / jpeg / olympus.py View on Github external
},
	0x201: { 'JPEGQuality': { 
				1:"SQ",
				2:"HQ",
				3:"SHQ"
            }
        },
	0x202: { 'Macro': {
				0:"Normal",
				1:"Macro"
	        }
        }
    }


class MakerNotes(InterpretedMakerNotes):
    def __init__(self, exif):
        super(MakerNotes, self).__init__(exif)

        for tag in olympus_map.keys():
            t = self._raw.get(tag)
            el, val = olympus_map[tag].items()[0]
            if val=={}:
                val = t.value
            else:
                val = val.get(t.value, "uknown: %s" % t.value)
            setattr(self.__class__, el, property(fget = lambda s, v=val: v))   #make it read only
github straup / filtr / utils / jpeg / canon.py View on Github external
0:"Auto",
				1:"Sunny",
				2:"Cloudy",
				3:"Tungsten",
				4:"Flourescent",
				5:"Flash",
				6:"Custom"},
			'SequenceNumber': {'mindex':9},                     #9
			'AFPointUsed': {'mindex':14},                     #14
			'FlashBias': { 'mindex':15,                  #15
				'.':"EV"},
			'SubjectDistance': {'mindex':19},                     #19
        }
        }

class MakerNotes(InterpretedMakerNotes):
    def __init__(self, exif):
        super(MakerNotes, self).__init__(exif)

        for tag in canon_map.keys():
            t = self._raw.get(tag)
            for el, val in canon_map[tag].items():
                if len(val.keys())==1:
                    val = t.value[val['mindex']]
                else:
                    val = val.get(t.value[val['mindex']], "uknown: %s" % t.value[val['mindex']])
                setattr(self.__class__, el, property(fget = lambda s, v=val: v))   #make it read only

exif

Read and modify image EXIF metadata using Python.

MIT
Latest version published 6 days ago

Package Health Score

90 / 100
Full package analysis