mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Add missing paramters to docstrings
This commit is contained in:
parent
1997c814ab
commit
965df6df6f
|
@ -10,6 +10,10 @@ metadata tag numbers, names, and type information.
|
|||
.. method:: lookup(tag)
|
||||
|
||||
:param tag: Integer tag number
|
||||
:param group: Which :py:data:`~PIL.TiffTags.TAGS_V2_GROUPS` to look in
|
||||
|
||||
.. versionadded:: 8.3.0
|
||||
|
||||
: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
|
||||
|
@ -42,6 +46,16 @@ metadata tag numbers, names, and type information.
|
|||
|
||||
.. versionadded:: 3.0.0
|
||||
|
||||
.. py:data:: PIL.TiffTags.TAGS_V2_GROUPS
|
||||
:type: dict
|
||||
|
||||
:py:data:`~PIL.TiffTags.TAGS_V2` is one dimensional and
|
||||
doesn't account for the fact that tags actually exist in
|
||||
`different groups <https://exiftool.org/TagNames/EXIF.html>`_.
|
||||
This dictionary is used when the tag in question is part of a group.
|
||||
|
||||
.. versionadded:: 8.3.0
|
||||
|
||||
.. py:data:: PIL.TiffTags.TAGS
|
||||
:type: dict
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ def open(fp, mode="r"):
|
|||
"""
|
||||
Load texture from a GD image file.
|
||||
|
||||
:param filename: GD file name, or an opened file handle.
|
||||
:param fp: GD file name, or an opened file handle.
|
||||
:param mode: Optional mode. In this version, if the mode argument
|
||||
is given, it must be "r".
|
||||
:returns: An image instance.
|
||||
|
|
|
@ -316,6 +316,7 @@ def offset(image, xoffset, yoffset=None):
|
|||
distances. Data wraps around the edges. If ``yoffset`` is omitted, it
|
||||
is assumed to be equal to ``xoffset``.
|
||||
|
||||
:param image: Input image.
|
||||
:param xoffset: The horizontal distance.
|
||||
:param yoffset: The vertical distance. If omitted, both
|
||||
distances are set to the same value.
|
||||
|
|
|
@ -121,12 +121,13 @@ def getrgb(color):
|
|||
def getcolor(color, mode):
|
||||
"""
|
||||
Same as :py:func:`~PIL.ImageColor.getrgb`, but converts the RGB value to a
|
||||
greyscale value if the mode is not color or a palette image. If the string
|
||||
greyscale value if ``mode`` is not color or a palette image. If the string
|
||||
cannot be parsed, this function raises a :py:exc:`ValueError` exception.
|
||||
|
||||
.. versionadded:: 1.1.4
|
||||
|
||||
:param color: A color string
|
||||
:param mode: Convert result to this mode
|
||||
:return: ``(graylevel [, alpha]) or (red, green, blue[, alpha])``
|
||||
"""
|
||||
# same as getrgb, but converts the result to the given mode
|
||||
|
|
|
@ -634,6 +634,7 @@ class FreeTypeFont:
|
|||
should have mode ``RGBA``. Otherwise, it should have mode ``1``.
|
||||
|
||||
:param text: Text to render.
|
||||
:param fill: A fill function.
|
||||
:param mode: Used by some graphics drivers to indicate what mode the
|
||||
driver prefers; if empty, the renderer may return either
|
||||
mode. Note that the mode is always a string, to simplify
|
||||
|
|
|
@ -184,6 +184,7 @@ class PhotoImage:
|
|||
:param im: A PIL image. The size must match the target region. If the
|
||||
mode does not match, the image is converted to the mode of
|
||||
the bitmap image.
|
||||
:param box: Deprecated.
|
||||
"""
|
||||
|
||||
if box is not None:
|
||||
|
|
|
@ -36,8 +36,12 @@ class TagInfo(namedtuple("_TagInfo", "value name type length enum")):
|
|||
def lookup(tag, group=None):
|
||||
"""
|
||||
:param tag: Integer tag number
|
||||
:returns: Taginfo namedtuple, From the TAGS_V2 info if possible,
|
||||
otherwise just populating the value and name from TAGS.
|
||||
:param group: Which :py:data:`~PIL.TiffTags.TAGS_V2_GROUPS` to look in
|
||||
|
||||
.. versionadded:: 8.3.0
|
||||
|
||||
:returns: 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
|
||||
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user