2021-01-26 10:14:28 +03:00
|
|
|
8.2.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
Deprecations
|
|
|
|
============
|
|
|
|
|
|
|
|
Tk/Tcl 8.4
|
|
|
|
^^^^^^^^^^
|
|
|
|
|
|
|
|
Support for Tk/Tcl 8.4 is deprecated and will be removed in Pillow 10.0.0 (2023-01-02),
|
|
|
|
when Tk/Tcl 8.5 will be the minimum supported.
|
|
|
|
|
|
|
|
API Changes
|
|
|
|
===========
|
|
|
|
|
2021-03-08 11:39:28 +03:00
|
|
|
Image.alpha_composite: dest
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-26 10:14:28 +03:00
|
|
|
|
2021-03-08 11:39:28 +03:00
|
|
|
When calling :py:meth:`~PIL.Image.Image.alpha_composite`, the ``dest`` argument now
|
|
|
|
accepts negative co-ordinates, like the upper left corner of the ``box`` argument of
|
|
|
|
:py:meth:`~PIL.Image.Image.paste` can be negative. Naturally, this has effect of
|
|
|
|
cropping the overlaid image.
|
2021-01-26 10:14:28 +03:00
|
|
|
|
2021-03-08 12:10:17 +03:00
|
|
|
ImageDraw.rounded_rectangle
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-26 10:14:28 +03:00
|
|
|
|
2021-03-08 12:10:17 +03:00
|
|
|
Added :py:meth:`~PIL.ImageDraw.ImageDraw.rounded_rectangle`. It works the same as
|
|
|
|
:py:meth:`~PIL.ImageDraw.ImageDraw.rectangle`, except with an additional ``radius``
|
|
|
|
argument. ``radius`` is limited to half of the width or the height, so that users can
|
|
|
|
create a circle, but not any other ellipse.
|
|
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
|
|
|
from PIL import Image, ImageDraw
|
|
|
|
im = Image.new("RGB", (200, 200))
|
|
|
|
draw = ImageDraw.Draw(im)
|
|
|
|
draw.rounded_rectangle(xy=(10, 20, 190, 180), radius=30, fill="red")
|
2021-01-26 10:14:28 +03:00
|
|
|
|
|
|
|
API Additions
|
|
|
|
=============
|
|
|
|
|
2021-03-04 00:59:47 +03:00
|
|
|
ImageShow.IPythonViewer
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-26 10:14:28 +03:00
|
|
|
|
2021-03-08 12:33:13 +03:00
|
|
|
If IPython is present, this new :py:class:`PIL.ImageShow.Viewer` subclass will be
|
2021-03-04 00:59:47 +03:00
|
|
|
registered. It displays images on all IPython frontends. This will be helpful
|
|
|
|
to users of Google Colab, allowing ``im.show()`` to display images.
|
|
|
|
|
2021-03-08 12:33:13 +03:00
|
|
|
It is lower in priority than the other default :py:class:`PIL.ImageShow.Viewer`
|
|
|
|
instances, so it will only be used by ``im.show()`` or :py:func:`.ImageShow.show()`
|
|
|
|
if none of the other viewers are available. This means that the behaviour of
|
|
|
|
:py:class:`PIL.ImageShow` will stay the same for most Pillow users.
|
2021-01-26 10:14:28 +03:00
|
|
|
|
|
|
|
Security
|
|
|
|
========
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
Other Changes
|
|
|
|
=============
|
|
|
|
|
2021-02-11 00:09:31 +03:00
|
|
|
PyQt6
|
|
|
|
^^^^^
|
2021-01-26 10:14:28 +03:00
|
|
|
|
2021-02-11 00:09:31 +03:00
|
|
|
Support has been added for PyQt6. If it is installed, it will be used instead of
|
|
|
|
PySide6, PyQt5 or PySide2.
|