mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-25 00:34:14 +03:00
Merge pull request #3451 from radarhere/releasenotes
Added release notes for #3406
This commit is contained in:
commit
3d76a686c4
|
@ -28,6 +28,13 @@ Results in the following::
|
||||||
(23, 24, 68)
|
(23, 24, 68)
|
||||||
(0, 0, 0)
|
(0, 0, 0)
|
||||||
|
|
||||||
|
Access using negative indexes is also possible.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
px[-1,-1] = (0,0,0)
|
||||||
|
print (px[-1,-1])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:py:class:`PixelAccess` Class
|
:py:class:`PixelAccess` Class
|
||||||
|
|
|
@ -29,6 +29,13 @@ Results in the following::
|
||||||
(23, 24, 68)
|
(23, 24, 68)
|
||||||
(0, 0, 0)
|
(0, 0, 0)
|
||||||
|
|
||||||
|
Access using negative indexes is also possible.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
px[-1,-1] = (0,0,0)
|
||||||
|
print (px[-1,-1])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:py:class:`PyAccess` Class
|
:py:class:`PyAccess` Class
|
||||||
|
|
|
@ -1,6 +1,19 @@
|
||||||
5.4.0 (unreleased)
|
5.4.0 (unreleased)
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
API Changes
|
||||||
|
===========
|
||||||
|
|
||||||
|
Negative indexes in pixel access
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
When accessing individual image pixels, negative indexes are now also accepted.
|
||||||
|
For example, to get or set the farthest pixel in the lower right of an image::
|
||||||
|
|
||||||
|
px = im.load()
|
||||||
|
print(px[-1, -1])
|
||||||
|
px[-1, -1] = (0, 0, 0)
|
||||||
|
|
||||||
|
|
||||||
Other Changes
|
Other Changes
|
||||||
=============
|
=============
|
||||||
|
|
Loading…
Reference in New Issue
Block a user