Skip to content

ExifTags

blanket.ExifTags provides integer enums and name dictionaries compatible with Pillow's ExifTags.

from blanket import ExifTags

assert ExifTags.Base.Orientation == 274
assert ExifTags.Base(274).name == "Orientation"
assert ExifTags.Base["Orientation"].value == 274
assert ExifTags.TAGS[274] == "Orientation"
assert ExifTags.GPSTAGS[2] == "GPSLatitude"
assert ExifTags.IFD.Exif == 34665

Base, GPS, IFD, Interop, and LightSource are enum.IntEnum classes. Unknown enum numbers raise ValueError; unknown names raise KeyError. TAGS and GPSTAGS are mutable dictionaries; use .get(tag, default) for unknown tags. Legacy TAGS names can differ from enum names, such as TIFF/EPStandardID versus Base.TIFFEPStandardID.

These constants describe metadata. They do not parse or write EXIF data. Blanket saves pixels only and does not preserve metadata.