mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-27 20:43:43 +03:00
Added release notes for #8330
This commit is contained in:
parent
98e74fd7a0
commit
f205a45f44
|
@ -81,6 +81,28 @@ DXT5, BC2, BC3 and BC5 are supported::
|
|||
Other Changes
|
||||
=============
|
||||
|
||||
Arrow support
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
`Arrow <https://arrow.apache.org/>`__ is an in-memory data exchange format that is the
|
||||
spiritual successor to the NumPy array interface. It provides for zero-copy access to
|
||||
columnar data, which in our case is ``Image`` data.
|
||||
|
||||
To create an image with zero-copy shared memory from an object exporting the
|
||||
arrow_c_array interface protocol::
|
||||
|
||||
from PIL import Image
|
||||
import pyarrow as pa
|
||||
arr = pa.array([0]*(5*5*4), type=pa.uint8())
|
||||
im = Image.fromarrow(arr, 'RGBA', (5, 5))
|
||||
|
||||
Pillow images can also be converted to Arrow objects::
|
||||
|
||||
from PIL import Image
|
||||
import pyarrow as pa
|
||||
im = Image.open('hopper.jpg')
|
||||
arr = pa.array(im)
|
||||
|
||||
Reading and writing AVIF images
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user