mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-28 17:03:13 +03:00
Merge pull request #6724 from radarhere/exif
This commit is contained in:
commit
ec2eff1b7c
|
@ -4,8 +4,35 @@
|
||||||
:py:mod:`~PIL.ExifTags` Module
|
:py:mod:`~PIL.ExifTags` Module
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
The :py:mod:`~PIL.ExifTags` module exposes two dictionaries which
|
The :py:mod:`~PIL.ExifTags` module exposes several ``enum.IntEnum`` classes
|
||||||
provide constants and clear-text names for various well-known EXIF tags.
|
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'
|
||||||
|
|
||||||
|
|
||||||
|
Two of these values are also exposed as dictionaries.
|
||||||
|
|
||||||
.. py:data:: TAGS
|
.. py:data:: TAGS
|
||||||
:type: dict
|
:type: dict
|
||||||
|
@ -26,22 +53,3 @@ provide constants and clear-text names for various well-known EXIF tags.
|
||||||
>>> from PIL.ExifTags import GPSTAGS
|
>>> from PIL.ExifTags import GPSTAGS
|
||||||
>>> GPSTAGS[20]
|
>>> GPSTAGS[20]
|
||||||
'GPSDestLatitude'
|
'GPSDestLatitude'
|
||||||
|
|
||||||
|
|
||||||
These values are also exposed as ``enum.IntEnum`` classes.
|
|
||||||
|
|
||||||
.. 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'
|
|
||||||
|
|
|
@ -338,3 +338,11 @@ class GPS(IntEnum):
|
||||||
|
|
||||||
"""Maps EXIF GPS tags to tag names."""
|
"""Maps EXIF GPS tags to tag names."""
|
||||||
GPSTAGS = {i.value: i.name for i in GPS}
|
GPSTAGS = {i.value: i.name for i in GPS}
|
||||||
|
|
||||||
|
|
||||||
|
class Interop(IntEnum):
|
||||||
|
InteropIndex = 1
|
||||||
|
InteropVersion = 2
|
||||||
|
RelatedImageFileFormat = 4096
|
||||||
|
RelatedImageWidth = 4097
|
||||||
|
RleatedImageHeight = 4098
|
||||||
|
|
Loading…
Reference in New Issue
Block a user