2021-10-18 03:05:53 +03:00
|
|
|
9.0.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
Backwards Incompatible Changes
|
|
|
|
==============================
|
|
|
|
|
2021-10-15 13:07:53 +03:00
|
|
|
Python 3.6
|
|
|
|
^^^^^^^^^^
|
|
|
|
|
|
|
|
Pillow has dropped support for Python 3.6, which reached end-of-life on 2021-12-23.
|
|
|
|
|
2021-10-18 03:05:53 +03:00
|
|
|
PILLOW_VERSION constant
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
``PILLOW_VERSION`` has been removed. Use ``__version__`` instead.
|
2021-10-18 02:53:16 +03:00
|
|
|
|
2021-10-17 23:29:41 +03:00
|
|
|
FreeType 2.7
|
|
|
|
^^^^^^^^^^^^
|
|
|
|
|
|
|
|
Support for FreeType 2.7 has been removed; FreeType 2.8 is the minimum supported.
|
|
|
|
|
|
|
|
We recommend upgrading to at least `FreeType`_ 2.10.4, which fixed a severe
|
|
|
|
vulnerability introduced in FreeType 2.6 (:cve:`CVE-2020-15999`).
|
|
|
|
|
|
|
|
.. _FreeType: https://www.freetype.org
|
|
|
|
|
2021-10-18 03:08:51 +03:00
|
|
|
Image.show command parameter
|
2021-10-17 23:29:41 +03:00
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-10-18 02:53:16 +03:00
|
|
|
|
2021-10-18 03:08:51 +03:00
|
|
|
The ``command`` parameter has been removed. Use a subclass of
|
|
|
|
:py:class:`PIL.ImageShow.Viewer` instead.
|
2021-10-18 02:53:48 +03:00
|
|
|
|
|
|
|
Image._showxv
|
2021-10-17 23:29:41 +03:00
|
|
|
^^^^^^^^^^^^^
|
2021-10-18 02:53:48 +03:00
|
|
|
|
|
|
|
``Image._showxv`` has been removed. Use :py:meth:`~PIL.Image.Image.show`
|
|
|
|
instead. If custom behaviour is required, use :py:meth:`~PIL.ImageShow.register` to add
|
|
|
|
a custom :py:class:`~PIL.ImageShow.Viewer` class.
|
2021-10-18 03:08:51 +03:00
|
|
|
|
|
|
|
ImageFile.raise_ioerror
|
2021-10-17 23:29:41 +03:00
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
2021-10-18 03:08:51 +03:00
|
|
|
|
|
|
|
``IOError`` was merged into ``OSError`` in Python 3.3. So, ``ImageFile.raise_ioerror``
|
|
|
|
has been removed. Use ``ImageFile.raise_oserror`` instead.
|
|
|
|
|
2021-10-17 23:29:41 +03:00
|
|
|
|
|
|
|
Deprecations
|
|
|
|
============
|
|
|
|
|
|
|
|
TODO
|
|
|
|
^^^^
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
2021-10-18 03:08:51 +03:00
|
|
|
API Changes
|
|
|
|
===========
|
|
|
|
|
2021-11-22 01:56:32 +03:00
|
|
|
Added line width parameter to ImageDraw polygon
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
An optional line ``width`` parameter has been added to ``ImageDraw.Draw.polygon``.
|
2021-10-18 03:08:51 +03:00
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
API Additions
|
|
|
|
=============
|
|
|
|
|
2021-10-24 03:53:45 +03:00
|
|
|
Added support for "title" argument to DisplayViewer
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
Support has been added for the "title" argument in
|
|
|
|
:py:class:`~PIL.ImageShow.UnixViewer.DisplayViewer`, so that when ``im.show()`` or
|
|
|
|
:py:func:`.ImageShow.show()` use the ``display`` command line tool, the "title"
|
|
|
|
argument will also now be supported, e.g. ``im.show(title="My Image")`` and
|
|
|
|
``ImageShow.show(im, title="My Image")``.
|
2021-10-18 03:08:51 +03:00
|
|
|
|
2021-11-11 15:46:48 +03:00
|
|
|
Security
|
|
|
|
========
|
|
|
|
|
|
|
|
TODO
|
|
|
|
^^^^
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
Other Changes
|
|
|
|
=============
|
|
|
|
|
2021-11-10 15:34:20 +03:00
|
|
|
Added support for pickling TrueType fonts
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
TrueType fonts may now be pickled and unpickled. For example:
|
|
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
2021-11-11 12:27:13 +03:00
|
|
|
import pickle
|
|
|
|
from PIL import ImageFont
|
2021-11-10 15:34:20 +03:00
|
|
|
|
|
|
|
font = ImageFont.truetype("arial.ttf", size=30)
|
2021-11-11 12:27:13 +03:00
|
|
|
pickled_font = pickle.dumps(font, protocol=pickle.HIGHEST_PROTOCOL)
|
2021-11-10 15:34:20 +03:00
|
|
|
|
|
|
|
# Later...
|
|
|
|
unpickled_font = pickle.loads(pickled_font)
|
2021-11-22 02:12:48 +03:00
|
|
|
|
|
|
|
Added support for additional TGA orientations
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
TGA images with top right or bottom right orientations are now supported.
|