add release notes

This commit is contained in:
Alexander 2019-11-30 18:17:10 +03:00
parent c23f29481c
commit 4e092153fc
2 changed files with 16 additions and 2 deletions

View File

@ -47,6 +47,20 @@ Setting the size of TIFF images
Setting the size of a TIFF image directly (eg. ``im.size = (256, 256)``) throws
an error. Use ``Image.resize`` instead.
Image.draft() return value
^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``Image.draft()`` method used to return ``None`` or the image itself.
Unlike other `chain methods`_, ``draft()`` modifies the image in-place
rather than returning a modified version.
In the new version, ``draft()`` returns ``None`` if it has no effect or
a tuple of new image mode and the box of original coordinates in the
bounds of resulting image otherwise
(the box could be useful in subsequent ``resize()`` call).
.. _chain methods: https://en.wikipedia.org/wiki/Method_chaining
API Changes
===========

View File

@ -1130,8 +1130,8 @@ class Image:
JPEG to greyscale while loading it, or to extract a 128x192
version from a PCD file.
If any changes are made, returns a tuple with the chosen `mode` and
`box` with coordinates of the original image within the altered one.
If any changes are made, returns a tuple with the chosen ``mode`` and
``box`` with coordinates of the original image within the altered one.
Note that this method modifies the :py:class:`~PIL.Image.Image` object
in place. If the image has already been loaded, this method has no