TiffTags Module
The TiffTags
module exposes many of the standard TIFFmetadata tag numbers, names, and type information.
PIL.TiffTags.
lookup
(tag)[source]
Parameters:tag – Integer tag numberReturns:Taginfo namedtuple, From the TAGS_V2
info if possible,otherwise just populating the value and name from TAGS
.If the tag is not recognized, “unknown” is returned for the name
New in version 3.1.0.
- class
PIL.TiffTags.
TagInfo
[source]
Parameters:
- **value** – Integer Tag Number
- **name** – Tag Name
- **type** – Integer type from [<code>PIL.TiffTags.TYPES</code>](#PIL.TiffTags.PIL.TiffTags.TYPES)
- **length** – Array length: 0 == variable, 1 == single value, n = fixed
- **enum** – Dict of name:integer value options for an enumeration
cvtenum
(_self, value)[source]
Parameters:value – The enumerated value nameReturns:The integer corresponding to the name.
New in version 3.0.0.
PIL.TiffTags.
TAGS_V2
- The
TAGS_V2
dictionary maps 16-bit integer tag numbers toPIL.TagTypes.TagInfo
tuples for metadata fields defined in the TIFFspec.
New in version 3.0.0.
PIL.TiffTags.
TAGS
- The
TAGS
dictionary maps 16-bit integer TIFF tag number todescriptive string names. For instance:
- >>> from PIL.TiffTags import TAGS
- >>> TAGS[0x010e]
- 'ImageDescription'
This dictionary contains a superset of the tags in TAGS_V2, commonEXIF tags, and other well known metadata tags.