mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-04 21:23:10 +03:00
Mention available pixel types when converting from NumPy
This commit is contained in:
parent
e95b55acd4
commit
485532c1f3
|
@ -3041,6 +3041,10 @@ def fromarray(obj, mode=None):
|
||||||
If ``obj`` is not contiguous, then the ``tobytes`` method is called
|
If ``obj`` is not contiguous, then the ``tobytes`` method is called
|
||||||
and :py:func:`~PIL.Image.frombuffer` is used.
|
and :py:func:`~PIL.Image.frombuffer` is used.
|
||||||
|
|
||||||
|
In the case of NumPy, be aware that Pillow modes do not always correspond
|
||||||
|
to NumPy dtypes. Pillow modes only offer 1-bit pixels, 8-bit pixels,
|
||||||
|
32-signed integer pixels and 32-bit floating point pixels.
|
||||||
|
|
||||||
Pillow images can also be converted to arrays::
|
Pillow images can also be converted to arrays::
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
Loading…
Reference in New Issue
Block a user