exiv2.tags

Exif key class and data attributes.

Inheritance diagram of exiv2.metadatum.Key

Enums

IfdId

Type to specify the IFD to which a metadata belongs.

SectionId

Section identifiers to logically group tags.

Classes

ExifKey

Concrete keys for Exif metadata and access to Exif tag reference data.

ExifTags

Access to Exif group and tag lists and misc.

GroupInfo

The details of an Exif group.

TagInfo

Tag information

class ExifKey

Bases: Key

Concrete keys for Exif metadata and access to Exif tag reference data.

__annotations__ = {}
clone()

Return an auto-pointer to a copy of itself (deep copy). The caller owns this copy and the auto-pointer ensures that it will be deleted.

defaultTypeId()

Return the default type id for this tag.

familyName()

Return an identifier for the type of metadata (the first part of the key)

groupName()

Return the name of the group (the second part of the key)

idx()

Return the index (unique id of this key within the original Exif data, 0 if not set)

key()

Return the key of the metadatum as a string. The key is of the form ‘familyName.groupName.tagName’. Note however that the key is not necessarily unique, e.g., an ExifData may contain multiple metadata with the same key.

setIdx()

Set the index.

tag()

Return the tag number

tagDesc()

Return a description for the tag

tagLabel()

Return a label for the tag

tagName()

Return the name of the tag (which is also the third part of the key)

class ExifTags

Bases: SwigPyObject

Access to Exif group and tag lists and misc. tag reference methods, implemented as a static class.

__annotations__ = {}
static defaultCount()

Return the default number of components (not bytes!) key has. (0=any, -1=count not known)

static groupList()

Return read-only list of built-in groups

static ifdName()

Return the name of the IFD for the group.

static isExifGroup()

Return true if groupName is a TIFF or Exif IFD, else false. This is used to differentiate between standard Exif IFDs and IFDs associated with the makernote.

static isMakerGroup()

Return true if groupName is a makernote group.

static sectionName()

Return the name of the section for an Exif key.

static tagList()

Return read-only list of built-in groupName tags.

class GroupInfo

Bases: SwigPyObject

The details of an Exif group. Groups include IFDs and binary arrays.

__annotations__ = {}
__getitem__(key, /)

Return self[key].

__iter__()

Implement iter(self).

groupName_

Group name, unique for each group.

ifdId_

IFD id

ifdName_

IFD name

items()

Get structure members.

Return type:

tuple of (str, value) tuple

Returns:

structure member (name, value) pairs.

static keys()

Get structure member names.

Return the names used to access members as attributes (object.name) or with dict-like indexing (object['name']). Attribute access is preferred as it is more efficient.

Although the exiv2 C++ structure member names end with underscores, the Python interface uses names without underscores.

Return type:

tuple of str

Returns:

structure member names.

tagList_

Tag list

values()

Get structure member values.

Return type:

tuple of value

Returns:

structure member values.

enum IfdId(value)

Bases: IntEnum

Type to specify the IFD to which a metadata belongs.

Member Type:

int

Valid values are as follows:

ifdIdNotSet = <IfdId.ifdIdNotSet: 0>
ifd0Id = <IfdId.ifd0Id: 1>
ifd1Id = <IfdId.ifd1Id: 2>
ifd2Id = <IfdId.ifd2Id: 3>
ifd3Id = <IfdId.ifd3Id: 4>
exifId = <IfdId.exifId: 5>
gpsId = <IfdId.gpsId: 6>
iopId = <IfdId.iopId: 7>
mpfId = <IfdId.mpfId: 8>
subImage1Id = <IfdId.subImage1Id: 9>
subImage2Id = <IfdId.subImage2Id: 10>
subImage3Id = <IfdId.subImage3Id: 11>
subImage4Id = <IfdId.subImage4Id: 12>
subImage5Id = <IfdId.subImage5Id: 13>
subImage6Id = <IfdId.subImage6Id: 14>
subImage7Id = <IfdId.subImage7Id: 15>
subImage8Id = <IfdId.subImage8Id: 16>
subImage9Id = <IfdId.subImage9Id: 17>
subThumb1Id = <IfdId.subThumb1Id: 18>
panaRawId = <IfdId.panaRawId: 19>
mnId = <IfdId.mnId: 20>
canonId = <IfdId.canonId: 21>
canonAfCId = <IfdId.canonAfCId: 22>
canonAfMiAdjId = <IfdId.canonAfMiAdjId: 23>
canonAmId = <IfdId.canonAmId: 24>
canonAsId = <IfdId.canonAsId: 25>
canonCbId = <IfdId.canonCbId: 26>
canonCiId = <IfdId.canonCiId: 27>
canonCsId = <IfdId.canonCsId: 28>
canonFilId = <IfdId.canonFilId: 29>
canonFlId = <IfdId.canonFlId: 30>
canonHdrId = <IfdId.canonHdrId: 31>
canonLeId = <IfdId.canonLeId: 32>
canonMeId = <IfdId.canonMeId: 33>
canonMoID = <IfdId.canonMoID: 34>
canonMvId = <IfdId.canonMvId: 35>
canonRawBId = <IfdId.canonRawBId: 36>
canonSiId = <IfdId.canonSiId: 37>
canonCfId = <IfdId.canonCfId: 38>
canonContrastId = <IfdId.canonContrastId: 39>
canonFcd1Id = <IfdId.canonFcd1Id: 40>
canonFcd2Id = <IfdId.canonFcd2Id: 41>
canonFcd3Id = <IfdId.canonFcd3Id: 42>
canonLiOpId = <IfdId.canonLiOpId: 43>
canonMyColorID = <IfdId.canonMyColorID: 44>
canonPiId = <IfdId.canonPiId: 45>
canonPaId = <IfdId.canonPaId: 46>
canonTiId = <IfdId.canonTiId: 47>
canonFiId = <IfdId.canonFiId: 48>
canonPrId = <IfdId.canonPrId: 49>
canonPreID = <IfdId.canonPreID: 50>
canonVigCorId = <IfdId.canonVigCorId: 51>
canonVigCor2Id = <IfdId.canonVigCor2Id: 52>
canonWbId = <IfdId.canonWbId: 53>
casioId = <IfdId.casioId: 54>
casio2Id = <IfdId.casio2Id: 55>
fujiId = <IfdId.fujiId: 56>
minoltaId = <IfdId.minoltaId: 57>
minoltaCs5DId = <IfdId.minoltaCs5DId: 58>
minoltaCs7DId = <IfdId.minoltaCs7DId: 59>
minoltaCsOldId = <IfdId.minoltaCsOldId: 60>
minoltaCsNewId = <IfdId.minoltaCsNewId: 61>
nikon1Id = <IfdId.nikon1Id: 62>
nikon2Id = <IfdId.nikon2Id: 63>
nikon3Id = <IfdId.nikon3Id: 64>
nikonPvId = <IfdId.nikonPvId: 65>
nikonVrId = <IfdId.nikonVrId: 66>
nikonPcId = <IfdId.nikonPcId: 67>
nikonWtId = <IfdId.nikonWtId: 68>
nikonIiId = <IfdId.nikonIiId: 69>
nikonAfId = <IfdId.nikonAfId: 70>
nikonAf21Id = <IfdId.nikonAf21Id: 71>
nikonAf22Id = <IfdId.nikonAf22Id: 72>
nikonAFTId = <IfdId.nikonAFTId: 73>
nikonFiId = <IfdId.nikonFiId: 74>
nikonMeId = <IfdId.nikonMeId: 75>
nikonFl1Id = <IfdId.nikonFl1Id: 76>
nikonFl2Id = <IfdId.nikonFl2Id: 77>
nikonFl3Id = <IfdId.nikonFl3Id: 78>
nikonFl6Id = <IfdId.nikonFl6Id: 79>
nikonFl7Id = <IfdId.nikonFl7Id: 80>
nikonSi1Id = <IfdId.nikonSi1Id: 81>
nikonSi2Id = <IfdId.nikonSi2Id: 82>
nikonSi3Id = <IfdId.nikonSi3Id: 83>
nikonSi4Id = <IfdId.nikonSi4Id: 84>
nikonSi5Id = <IfdId.nikonSi5Id: 85>
nikonSi6Id = <IfdId.nikonSi6Id: 86>
nikonLd1Id = <IfdId.nikonLd1Id: 87>
nikonLd2Id = <IfdId.nikonLd2Id: 88>
nikonLd3Id = <IfdId.nikonLd3Id: 89>
nikonLd4Id = <IfdId.nikonLd4Id: 90>
nikonCb1Id = <IfdId.nikonCb1Id: 91>
nikonCb2Id = <IfdId.nikonCb2Id: 92>
nikonCb2aId = <IfdId.nikonCb2aId: 93>
nikonCb2bId = <IfdId.nikonCb2bId: 94>
nikonCb3Id = <IfdId.nikonCb3Id: 95>
nikonCb4Id = <IfdId.nikonCb4Id: 96>
olympusId = <IfdId.olympusId: 97>
olympus2Id = <IfdId.olympus2Id: 98>
olympusCsId = <IfdId.olympusCsId: 99>
olympusEqId = <IfdId.olympusEqId: 100>
olympusRdId = <IfdId.olympusRdId: 101>
olympusRd2Id = <IfdId.olympusRd2Id: 102>
olympusIpId = <IfdId.olympusIpId: 103>
olympusFiId = <IfdId.olympusFiId: 104>
olympusFe1Id = <IfdId.olympusFe1Id: 105>
olympusFe2Id = <IfdId.olympusFe2Id: 106>
olympusFe3Id = <IfdId.olympusFe3Id: 107>
olympusFe4Id = <IfdId.olympusFe4Id: 108>
olympusFe5Id = <IfdId.olympusFe5Id: 109>
olympusFe6Id = <IfdId.olympusFe6Id: 110>
olympusFe7Id = <IfdId.olympusFe7Id: 111>
olympusFe8Id = <IfdId.olympusFe8Id: 112>
olympusFe9Id = <IfdId.olympusFe9Id: 113>
olympusRiId = <IfdId.olympusRiId: 114>
panasonicId = <IfdId.panasonicId: 115>
pentaxId = <IfdId.pentaxId: 116>
pentaxDngId = <IfdId.pentaxDngId: 117>
samsung2Id = <IfdId.samsung2Id: 118>
samsungPvId = <IfdId.samsungPvId: 119>
samsungPwId = <IfdId.samsungPwId: 120>
sigmaId = <IfdId.sigmaId: 121>
sony1Id = <IfdId.sony1Id: 122>
sony2Id = <IfdId.sony2Id: 123>
sonyMltId = <IfdId.sonyMltId: 124>
sony1CsId = <IfdId.sony1CsId: 125>
sony1Cs2Id = <IfdId.sony1Cs2Id: 126>
sony2CsId = <IfdId.sony2CsId: 127>
sony2Cs2Id = <IfdId.sony2Cs2Id: 128>
sony2FpId = <IfdId.sony2FpId: 129>
sonyMisc1Id = <IfdId.sonyMisc1Id: 130>
sonyMisc2bId = <IfdId.sonyMisc2bId: 131>
sonyMisc3cId = <IfdId.sonyMisc3cId: 132>
sonySInfo1Id = <IfdId.sonySInfo1Id: 133>
sony2010eId = <IfdId.sony2010eId: 134>
sony1MltCs7DId = <IfdId.sony1MltCs7DId: 135>
sony1MltCsOldId = <IfdId.sony1MltCsOldId: 136>
sony1MltCsNewId = <IfdId.sony1MltCsNewId: 137>
sony1MltCsA100Id = <IfdId.sony1MltCsA100Id: 138>
tagInfoMvId = <IfdId.tagInfoMvId: 139>
lastId = <IfdId.lastId: 140>
enum SectionId(value)

Bases: IntEnum

Section identifiers to logically group tags. A section consists of nothing more than a name, based on the Exif standard.

Member Type:

int

Valid values are as follows:

sectionIdNotSet = <SectionId.sectionIdNotSet: 0>
imgStruct = <SectionId.imgStruct: 1>
recOffset = <SectionId.recOffset: 2>
imgCharacter = <SectionId.imgCharacter: 3>
otherTags = <SectionId.otherTags: 4>
exifFormat = <SectionId.exifFormat: 5>
exifVersion = <SectionId.exifVersion: 6>
imgConfig = <SectionId.imgConfig: 7>
userInfo = <SectionId.userInfo: 8>
relatedFile = <SectionId.relatedFile: 9>
dateTime = <SectionId.dateTime: 10>
captureCond = <SectionId.captureCond: 11>
gpsTags = <SectionId.gpsTags: 12>
iopTags = <SectionId.iopTags: 13>
mpfTags = <SectionId.mpfTags: 14>
makerTags = <SectionId.makerTags: 15>
dngTags = <SectionId.dngTags: 16>
panaRaw = <SectionId.panaRaw: 17>
tiffEp = <SectionId.tiffEp: 18>
tiffPm6 = <SectionId.tiffPm6: 19>
adobeOpi = <SectionId.adobeOpi: 20>
lastSectionId = <SectionId.lastSectionId: 21>
class TagInfo

Bases: SwigPyObject

Tag information

__annotations__ = {}
__getitem__(key, /)

Return self[key].

__iter__()

Implement iter(self).

count_

The number of values (not bytes!), 0=any, -1=count not known.

desc_

Short tag description

ifdId_

Link to the (preferred) IFD

items()

Get structure members.

Return type:

tuple of (str, value) tuple

Returns:

structure member (name, value) pairs.

static keys()

Get structure member names.

Return the names used to access members as attributes (object.name) or with dict-like indexing (object['name']). Attribute access is preferred as it is more efficient.

Although the exiv2 C++ structure member names end with underscores, the Python interface uses names without underscores.

Return type:

tuple of str

Returns:

structure member names.

name_

One word tag label

sectionId_

Section id

tag_

Tag

title_

Tag title

typeId_

Type id

values()

Get structure member values.

Return type:

tuple of value

Returns:

structure member values.