exiv2._tags

Exif key class and data attributes.

Classes

Inheritance diagram of exiv2.ExifKey, exiv2.IptcKey, exiv2.XmpKey

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.

IfdId

Type to specify the IFD to which a metadata belongs.

SectionId

Section identifiers to logically group tags.

TagInfo

Tag information

class ExifKey

Bases: Key

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

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.

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.

groupName_

Group name, unique for each group.

ifdId_

IFD id

ifdName_

IFD name

items()

Get structure members.

Return type:

list of (str, value) tuple

Returns:

structure member (name, value) pairs (with any trailing underscores removed from names).

keys()

Get structure member names.

Return type:

list of str

Returns:

structure member names (with any trailing underscores removed).

tagList_

Tag list

values()

Get structure member values.

Return type:

list of value

Returns:

structure member values.

class IfdId

Bases: IntEnum

Type to specify the IFD to which a metadata belongs.

Maker note IFDs have been omitted from this enum.

exifId = 5
gpsId = 6
ifd0Id = 1
ifd1Id = 2
ifd2Id = 3
ifd3Id = 4
ifdIdNotSet = 0
ignoreId = 140
iopId = 7
lastId = 140
mpfId = 8
subImage1Id = 9
subImage2Id = 10
subImage3Id = 11
subImage4Id = 12
subImage5Id = 13
subImage6Id = 14
subImage7Id = 15
subImage8Id = 16
subImage9Id = 17
subThumb1Id = 18
class SectionId

Bases: IntEnum

Section identifiers to logically group tags.

A section consists of nothing more than a name, based on the Exif standard.

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

Bases: SwigPyObject

Tag information

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:

list of (str, value) tuple

Returns:

structure member (name, value) pairs (with any trailing underscores removed from names).

keys()

Get structure member names.

Return type:

list of str

Returns:

structure member names (with any trailing underscores removed).

name_

One word tag label

sectionId_

Section id

tag_

Tag

title_

Tag title

typeId_

Type id

values()

Get structure member values.

Return type:

list of value

Returns:

structure member values.