Skip to content

Commit fe9b699

Browse files
authored
Merge pull request #6099 from radarhere/pixels
Document alternatives to accessing individual pixels
2 parents 180c89f + 4615e1d commit fe9b699

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

docs/reference/PixelAccess.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
The PixelAccess class provides read and write access to
77
:py:class:`PIL.Image` data at a pixel level.
88

9-
.. note:: Accessing individual pixels is fairly slow. If you are looping over all of the pixels in an image, there is likely a faster way using other parts of the Pillow API.
9+
.. note:: Accessing individual pixels is fairly slow. If you are
10+
looping over all of the pixels in an image, there is likely
11+
a faster way using other parts of the Pillow API.
12+
13+
:mod:`~PIL.Image`, :mod:`~PIL.ImageChops` and :mod:`~PIL.ImageOps`
14+
have methods for many standard operations. If you wish to perform
15+
a custom mapping, check out :py:meth:`~PIL.Image.Image.point`.
1016

1117
Example
1218
-------
@@ -39,7 +45,7 @@ Access using negative indexes is also possible.
3945
4046
4147
:py:class:`PixelAccess` Class
42-
-----------------------------------
48+
-----------------------------
4349

4450
.. class:: PixelAccess
4551

docs/reference/PyAccess.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
The :py:mod:`~PIL.PyAccess` module provides a CFFI/Python implementation of the :ref:`PixelAccess`. This implementation is far faster on PyPy than the PixelAccess version.
88

99
.. note:: Accessing individual pixels is fairly slow. If you are
10-
looping over all of the pixels in an image, there is likely
11-
a faster way using other parts of the Pillow API.
10+
looping over all of the pixels in an image, there is likely
11+
a faster way using other parts of the Pillow API.
12+
13+
:mod:`~PIL.Image`, :mod:`~PIL.ImageChops` and :mod:`~PIL.ImageOps`
14+
have methods for many standard operations. If you wish to perform
15+
a custom mapping, check out :py:meth:`~PIL.Image.Image.point`.
1216

1317
Example
1418
-------

0 commit comments

Comments
 (0)