File: ExifTags.rst

package info (click to toggle)
pillow 12.1.0-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 72,560 kB
  • sloc: python: 49,748; ansic: 38,748; makefile: 302; sh: 168; javascript: 85
file content (71 lines) | stat: -rw-r--r-- 1,578 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
.. py:module:: PIL.ExifTags
.. py:currentmodule:: PIL.ExifTags

:py:mod:`~PIL.ExifTags` module
==============================

The :py:mod:`~PIL.ExifTags` module exposes several :py:class:`enum.IntEnum`
classes which provide constants and clear-text names for various well-known
EXIF tags.

.. py:data:: Base

    >>> from PIL.ExifTags import Base
    >>> Base.ImageDescription.value
    270
    >>> Base(270).name
    'ImageDescription'

.. py:data:: GPS

    >>> from PIL.ExifTags import GPS
    >>> GPS.GPSDestLatitude.value
    20
    >>> GPS(20).name
    'GPSDestLatitude'

.. py:data:: Interop

    >>> from PIL.ExifTags import Interop
    >>> Interop.RelatedImageFileFormat.value
    4096
    >>> Interop(4096).name
    'RelatedImageFileFormat'

.. py:data:: IFD

    >>> from PIL.ExifTags import IFD
    >>> IFD.Exif.value
    34665
    >>> IFD(34665).name
    'Exif

.. py:data:: LightSource

    >>> from PIL.ExifTags import LightSource
    >>> LightSource.Unknown.value
    0
    >>> LightSource(0).name
    'Unknown'

Two of these values are also exposed as dictionaries.

.. py:data:: TAGS
    :type: dict

    The TAGS dictionary maps 16-bit integer EXIF tag enumerations to
    descriptive string names. For instance:

        >>> from PIL.ExifTags import TAGS
        >>> TAGS[0x010e]
        'ImageDescription'

.. py:data:: GPSTAGS
    :type: dict

    The GPSTAGS dictionary maps 8-bit integer EXIF GPS enumerations to
    descriptive string names. For instance:

        >>> from PIL.ExifTags import GPSTAGS
        >>> GPSTAGS[20]
        'GPSDestLatitude'