fix some docs links

This commit is contained in:
nulano 2020-06-14 17:16:15 +02:00
parent d4c432dd2f
commit c40b0e5426
6 changed files with 33 additions and 29 deletions

View File

@ -7,7 +7,8 @@
The :py:mod:`ExifTags` module exposes two dictionaries which
provide constants and clear-text names for various well-known EXIF tags.
.. py:class:: PIL.ExifTags.TAGS
.. py:data:: TAGS
:type: dict
The TAG dictionary maps 16-bit integer EXIF tag enumerations to
descriptive string names. For instance:
@ -16,7 +17,8 @@ provide constants and clear-text names for various well-known EXIF tags.
>>> TAGS[0x010e]
'ImageDescription'
.. py:class:: PIL.ExifTags.GPSTAGS
.. py:data:: GPSTAGS
:type: dict
The GPSTAGS dictionary maps 8-bit integer EXIF gps enumerations to
descriptive string names. For instance:

View File

@ -29,7 +29,8 @@ Classes
All enhancement classes implement a common interface, containing a single
method:
.. py:class:: PIL.ImageEnhance._Enhance
.. py:class:: _Enhance
.. py:method:: enhance(factor)
Returns an enhanced image.
@ -40,7 +41,7 @@ method:
etc), and higher values more. There are no restrictions
on this value.
.. py:class:: PIL.ImageEnhance.Color(image)
.. py:class:: Color(image)
Adjust image color balance.
@ -49,7 +50,7 @@ method:
factor of 0.0 gives a black and white image. A factor of 1.0 gives
the original image.
.. py:class:: PIL.ImageEnhance.Contrast(image)
.. py:class:: Contrast(image)
Adjust image contrast.
@ -57,7 +58,7 @@ method:
to the contrast control on a TV set. An enhancement factor of 0.0
gives a solid grey image. A factor of 1.0 gives the original image.
.. py:class:: PIL.ImageEnhance.Brightness(image)
.. py:class:: Brightness(image)
Adjust image brightness.
@ -65,7 +66,7 @@ method:
enhancement factor of 0.0 gives a black image. A factor of 1.0 gives the
original image.
.. py:class:: PIL.ImageEnhance.Sharpness(image)
.. py:class:: Sharpness(image)
Adjust image sharpness.

View File

@ -7,7 +7,7 @@
The :py:mod:`ImageStat` module calculates global statistics for an image, or
for a region of an image.
.. py:class:: PIL.ImageStat.Stat(image_or_list, mask=None)
.. py:class:: Stat(image_or_list, mask=None)
Calculate statistics for the given image. If a mask is included,
only the regions covered by that mask are included in the
@ -22,13 +22,13 @@ for a region of an image.
.. note::
This relies on the :py:meth:`~PIL.Image.histogram` method, and
This relies on the :py:meth:`~PIL.Image.Image.histogram` method, and
simply returns the low and high bins used. This is correct for
images with 8 bits per channel, but fails for other modes such as
``I`` or ``F``. Instead, use :py:meth:`~PIL.Image.getextrema` to
``I`` or ``F``. Instead, use :py:meth:`~PIL.Image.Image.getextrema` to
return per-band extrema for the image. This is more correct and
efficient because, for non-8-bit modes, the histogram method uses
:py:meth:`~PIL.Image.getextrema` to determine the bins used.
:py:meth:`~PIL.Image.Image.getextrema` to determine the bins used.
.. py:attribute:: count

View File

@ -6,6 +6,6 @@
.. automodule:: PIL.JpegPresets
.. data:: presets
:annotation:
:type: dict
A dict of all supported presets.
A dictionary of all supported presets.

View File

@ -10,8 +10,8 @@ metadata tag numbers, names, and type information.
.. method:: lookup(tag)
:param tag: Integer tag number
:returns: Taginfo namedtuple, From the ``TAGS_V2`` info if possible,
otherwise just populating the value and name from ``TAGS``.
:returns: Taginfo namedtuple, From the :py:data:`~PIL.TiffTags.TAGS_V2` info if possible,
otherwise just populating the value and name from :py:data:`~PIL.TiffTags.TAGS`.
If the tag is not recognized, "unknown" is returned for the name
.. versionadded:: 3.1.0
@ -22,7 +22,7 @@ metadata tag numbers, names, and type information.
:param value: Integer Tag Number
:param name: Tag Name
:param type: Integer type from :py:attr:`PIL.TiffTags.TYPES`
:param type: Integer type from :py:data:`PIL.TiffTags.TYPES`
:param length: Array length: 0 == variable, 1 == single value, n = fixed
:param enum: Dict of name:integer value options for an enumeration
@ -33,15 +33,17 @@ metadata tag numbers, names, and type information.
.. versionadded:: 3.0.0
.. py:attribute:: PIL.TiffTags.TAGS_V2
.. py:data:: PIL.TiffTags.TAGS_V2
:type: dict
The ``TAGS_V2`` dictionary maps 16-bit integer tag numbers to
:py:class:`PIL.TagTypes.TagInfo` tuples for metadata fields defined in the TIFF
:py:class:`PIL.TiffTags.TagInfo` tuples for metadata fields defined in the TIFF
spec.
.. versionadded:: 3.0.0
.. py:attribute:: PIL.TiffTags.TAGS
.. py:data:: PIL.TiffTags.TAGS
:type: dict
The ``TAGS`` dictionary maps 16-bit integer TIFF tag number to
descriptive string names. For instance:
@ -50,10 +52,11 @@ metadata tag numbers, names, and type information.
>>> TAGS[0x010e]
'ImageDescription'
This dictionary contains a superset of the tags in TAGS_V2, common
This dictionary contains a superset of the tags in :py:data:`~PIL.TiffTags.TAGS_V2`, common
EXIF tags, and other well known metadata tags.
.. py:attribute:: PIL.TiffTags.TYPES
.. py:data:: PIL.TiffTags.TYPES
:type: dict
The ``TYPES`` dictionary maps the TIFF type short integer to a
human readable type name.

View File

@ -9,13 +9,11 @@
# See the README file for information on usage and redistribution.
#
##
# This module provides constants and clear-text names for various
# well-known EXIF tags.
##
"""
This module provides constants and clear-text names for various
well-known EXIF tags.
"""
##
# Maps EXIF tags to tag names.
TAGS = {
# possibly incomplete
@ -280,9 +278,8 @@ TAGS = {
0xC74E: "OpcodeList3",
0xC761: "NoiseProfile",
}
"""Maps EXIF tags to tag names."""
##
# Maps EXIF GPS tags to tag names.
GPSTAGS = {
0: "GPSVersionID",
@ -318,3 +315,4 @@ GPSTAGS = {
30: "GPSDifferential",
31: "GPSHPositioningError",
}
"""Maps EXIF GPS tags to tag names."""