mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-15 09:44:46 +03:00
Updated documentation
This commit is contained in:
parent
74e36e0ee5
commit
e8b3c17ebc
|
@ -42,8 +42,11 @@ Image.fromarray mode parameter
|
|||
|
||||
.. deprecated:: 11.3.0
|
||||
|
||||
The ``mode`` parameter in :py:meth:`~PIL.Image.fromarray()` has been deprecated. The
|
||||
mode can be automatically determined from the object's shape and type instead.
|
||||
Using the ``mode`` parameter in :py:meth:`~PIL.Image.fromarray()` to change data types
|
||||
has been deprecated. Since pixel values do not contain information about palettes or
|
||||
color spaces, the parameter can still be used to place grayscale L mode data within a
|
||||
P mode image, or read RGB data as YCbCr for example. If omitted, the mode will be
|
||||
automatically determined from the object's shape and type.
|
||||
|
||||
Saving I mode images as PNG
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -29,6 +29,13 @@ Image.fromarray mode parameter
|
|||
The ``mode`` parameter in :py:meth:`~PIL.Image.fromarray()` has been deprecated. The
|
||||
mode can be automatically determined from the object's shape and type instead.
|
||||
|
||||
.. note::
|
||||
|
||||
Since pixel values do not contain information about palettes or color spaces, part
|
||||
of this functionality was restored in Pillow 12.0.0. The parameter can be used to
|
||||
place grayscale L mode data within a P mode image, or read RGB data as YCbCr for
|
||||
example.
|
||||
|
||||
Saving I mode images as PNG
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
@ -134,7 +134,11 @@ TODO
|
|||
Other changes
|
||||
=============
|
||||
|
||||
TODO
|
||||
^^^^
|
||||
Image.fromarray mode parameter
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
TODO
|
||||
In Pillow 11.3.0, the ``mode`` parameter in :py:meth:`~PIL.Image.fromarray()` was
|
||||
deprecated. Part of this functionality has been restored in Pillow 12.0.0. Since pixel
|
||||
values do not contain information about palettes or color spaces, the parameter can be
|
||||
used to place grayscale L mode data within a P mode image, or read RGB data as YCbCr
|
||||
for example.
|
||||
|
|
|
@ -3253,7 +3253,8 @@ def fromarray(obj: SupportsArrayInterface, mode: str | None = None) -> Image:
|
|||
:param obj: Object with array interface
|
||||
:param mode: Optional mode to use when reading ``obj``. Since pixel values do not
|
||||
contain information about palettes or color spaces, this can be used to place
|
||||
grayscale L mode data within a P mode image, or read RGB data as YCbCr.
|
||||
grayscale L mode data within a P mode image, or read RGB data as YCbCr for
|
||||
example.
|
||||
|
||||
See: :ref:`concept-modes` for general information about modes.
|
||||
:returns: An image object.
|
||||
|
|
Loading…
Reference in New Issue
Block a user