mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 05:06:49 +03:00
fix various reference typos
This commit is contained in:
parent
4046e1c921
commit
0083ebb3d4
|
@ -473,7 +473,7 @@ image formats, EXIF data is not guaranteed to be present in
|
||||||
:py:attr:`~PIL.Image.Image.info` until :py:meth:`~PIL.Image.Image.load` has been
|
:py:attr:`~PIL.Image.Image.info` until :py:meth:`~PIL.Image.Image.load` has been
|
||||||
called.
|
called.
|
||||||
|
|
||||||
The :py:meth:`~PIL.Image.Image.open` method sets the following
|
The :py:func:`~PIL.Image.open` function sets the following
|
||||||
:py:attr:`~PIL.Image.Image.info` properties, when appropriate:
|
:py:attr:`~PIL.Image.Image.info` properties, when appropriate:
|
||||||
|
|
||||||
**chromaticity**
|
**chromaticity**
|
||||||
|
|
|
@ -453,8 +453,8 @@ If everything goes well, the result is an :py:class:`PIL.Image.Image` object.
|
||||||
Otherwise, an :exc:`OSError` exception is raised.
|
Otherwise, an :exc:`OSError` exception is raised.
|
||||||
|
|
||||||
You can use a file-like object instead of the filename. The object must
|
You can use a file-like object instead of the filename. The object must
|
||||||
implement :py:meth:`~file.read`, :py:meth:`~file.seek` and
|
implement ``file.read``, ``file.seek`` and ``file.tell`` methods,
|
||||||
:py:meth:`~file.tell` methods, and be opened in binary mode.
|
and be opened in binary mode.
|
||||||
|
|
||||||
Reading from an open file
|
Reading from an open file
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -175,7 +175,7 @@ The fields are used as follows:
|
||||||
|
|
||||||
The **raw mode** field is used to determine how the data should be unpacked to
|
The **raw mode** field is used to determine how the data should be unpacked to
|
||||||
match PIL’s internal pixel layout. PIL supports a large set of raw modes; for a
|
match PIL’s internal pixel layout. PIL supports a large set of raw modes; for a
|
||||||
complete list, see the table in the :py:mod:`Unpack.c` module. The following
|
complete list, see the table in the :file:`Unpack.c` module. The following
|
||||||
table describes some commonly used **raw modes**:
|
table describes some commonly used **raw modes**:
|
||||||
|
|
||||||
+-----------+-----------------------------------------------------------------+
|
+-----------+-----------------------------------------------------------------+
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
The :py:mod:`~PIL.ImageFont` module defines a class with the same name. Instances of
|
The :py:mod:`~PIL.ImageFont` module defines a class with the same name. Instances of
|
||||||
this class store bitmap fonts, and are used with the
|
this class store bitmap fonts, and are used with the
|
||||||
:py:meth:`PIL.ImageDraw.Draw.text` method.
|
:py:meth:`PIL.ImageDraw.ImageDraw.text` method.
|
||||||
|
|
||||||
PIL uses its own font file format to store bitmap fonts. You can use the
|
PIL uses its own font file format to store bitmap fonts. You can use the
|
||||||
:command:`pilfont` utility from
|
:command:`pilfont` utility from
|
||||||
|
|
|
@ -717,7 +717,7 @@ class Image:
|
||||||
:param encoder_name: What encoder to use. The default is to
|
:param encoder_name: What encoder to use. The default is to
|
||||||
use the standard "raw" encoder.
|
use the standard "raw" encoder.
|
||||||
:param args: Extra arguments to the encoder.
|
:param args: Extra arguments to the encoder.
|
||||||
:rtype: A bytes object.
|
:returns: A :py:class:`bytes` object.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# may pass tuple instead of argument list
|
# may pass tuple instead of argument list
|
||||||
|
@ -2352,10 +2352,10 @@ class Image:
|
||||||
object::
|
object::
|
||||||
|
|
||||||
class Example(Image.ImageTransformHandler):
|
class Example(Image.ImageTransformHandler):
|
||||||
def transform(size, method, data, resample, fill=1):
|
def transform(self, size, data, resample, fill=1):
|
||||||
# Return result
|
# Return result
|
||||||
|
|
||||||
It may also be an object with a :py:meth:`~method.getdata` method
|
It may also be an object with a ``method.getdata`` method
|
||||||
that returns a tuple supplying new **method** and **data** values::
|
that returns a tuple supplying new **method** and **data** values::
|
||||||
|
|
||||||
class Example:
|
class Example:
|
||||||
|
@ -2847,8 +2847,8 @@ def open(fp, mode="r"):
|
||||||
:py:func:`~PIL.Image.new`. See :ref:`file-handling`.
|
:py:func:`~PIL.Image.new`. See :ref:`file-handling`.
|
||||||
|
|
||||||
:param fp: A filename (string), pathlib.Path object or a file object.
|
:param fp: A filename (string), pathlib.Path object or a file object.
|
||||||
The file object must implement :py:meth:`~file.read`,
|
The file object must implement ``file.read``,
|
||||||
:py:meth:`~file.seek`, and :py:meth:`~file.tell` methods,
|
``file.seek`, and ``file.tell`` methods,
|
||||||
and be opened in binary mode.
|
and be opened in binary mode.
|
||||||
:param mode: The mode. If given, this argument must be "r".
|
:param mode: The mode. If given, this argument must be "r".
|
||||||
:returns: An :py:class:`~PIL.Image.Image` object.
|
:returns: An :py:class:`~PIL.Image.Image` object.
|
||||||
|
|
|
@ -293,7 +293,7 @@ def logical_xor(image1, image2):
|
||||||
|
|
||||||
def blend(image1, image2, alpha):
|
def blend(image1, image2, alpha):
|
||||||
"""Blend images using constant transparency weight. Alias for
|
"""Blend images using constant transparency weight. Alias for
|
||||||
:py:meth:`PIL.Image.Image.blend`.
|
:py:func:`PIL.Image.blend`.
|
||||||
|
|
||||||
:rtype: :py:class:`~PIL.Image.Image`
|
:rtype: :py:class:`~PIL.Image.Image`
|
||||||
"""
|
"""
|
||||||
|
@ -303,7 +303,7 @@ def blend(image1, image2, alpha):
|
||||||
|
|
||||||
def composite(image1, image2, mask):
|
def composite(image1, image2, mask):
|
||||||
"""Create composite using transparency mask. Alias for
|
"""Create composite using transparency mask. Alias for
|
||||||
:py:meth:`PIL.Image.Image.composite`.
|
:py:func:`PIL.Image.composite`.
|
||||||
|
|
||||||
:rtype: :py:class:`~PIL.Image.Image`
|
:rtype: :py:class:`~PIL.Image.Image`
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user