mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-29 11:26:17 +03:00
116 lines
2.9 KiB
ReStructuredText
116 lines
2.9 KiB
ReStructuredText
9.0.0
|
|
-----
|
|
|
|
Backwards Incompatible Changes
|
|
==============================
|
|
|
|
Python 3.6
|
|
^^^^^^^^^^
|
|
|
|
Pillow has dropped support for Python 3.6, which reached end-of-life on 2021-12-23.
|
|
|
|
PILLOW_VERSION constant
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
``PILLOW_VERSION`` has been removed. Use ``__version__`` instead.
|
|
|
|
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
|
|
|
|
Image.show command parameter
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
The ``command`` parameter has been removed. Use a subclass of
|
|
:py:class:`PIL.ImageShow.Viewer` instead.
|
|
|
|
Image._showxv
|
|
^^^^^^^^^^^^^
|
|
|
|
``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.
|
|
|
|
ImageFile.raise_ioerror
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
``IOError`` was merged into ``OSError`` in Python 3.3. So, ``ImageFile.raise_ioerror``
|
|
has been removed. Use ``ImageFile.raise_oserror`` instead.
|
|
|
|
|
|
Deprecations
|
|
============
|
|
|
|
TODO
|
|
^^^^
|
|
|
|
TODO
|
|
|
|
API Changes
|
|
===========
|
|
|
|
Added line width parameter to ImageDraw polygon
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
An optional line ``width`` parameter has been added to ``ImageDraw.Draw.polygon``.
|
|
|
|
TODO
|
|
|
|
API Additions
|
|
=============
|
|
|
|
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")``.
|
|
|
|
Security
|
|
========
|
|
|
|
TODO
|
|
^^^^
|
|
|
|
TODO
|
|
|
|
Other Changes
|
|
=============
|
|
|
|
Convert subsequent GIF frames to RGB or RGBA
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
Since each frame of a GIF can have up to 256 colors, after the first frame it is
|
|
possible for there to be too many colors to fit in a P mode image. To allow for this,
|
|
seeking to any subsequent GIF frame will now convert the image to RGB or RGBA,
|
|
depending on whether or not the first frame had transparency.
|
|
|
|
Added support for pickling TrueType fonts
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
TrueType fonts may now be pickled and unpickled. For example:
|
|
|
|
.. code-block:: python
|
|
|
|
import pickle
|
|
from PIL import ImageFont
|
|
|
|
font = ImageFont.truetype("arial.ttf", size=30)
|
|
pickled_font = pickle.dumps(font, protocol=pickle.HIGHEST_PROTOCOL)
|
|
|
|
# Later...
|
|
unpickled_font = pickle.loads(pickled_font)
|
|
|
|
Added support for additional TGA orientations
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
TGA images with top right or bottom right orientations are now supported.
|