Pillow/docs/releasenotes/5.0.0.rst

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

107 lines
3.5 KiB
ReStructuredText
Raw Normal View History

5.0.0
2017-11-06 14:58:05 +03:00
-----
Backwards Incompatible Changes
==============================
Python 3.3 Dropped
^^^^^^^^^^^^^^^^^^
Python 3.3 is EOL and no longer supported due to moving testing from nose,
which is deprecated, to pytest, which doesn't support Python 3.3. We will not
be creating binaries, testing, or retaining compatibility with this version.
The final version of Pillow for Python 3.3 is 4.3.0.
2017-12-30 01:44:07 +03:00
Decompression Bombs now raise Exceptions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pillow has previously emitted warnings for images that are
unexpectedly large and may be a denial of service. These warnings are
now upgraded to ``DecompressionBombError``\s for images that are twice
2017-12-30 13:41:38 +03:00
the size of images that trigger the ``DecompressionBombWarning``. The
2018-01-01 17:22:03 +03:00
default threshold is 128Mpx, or 0.5GB for an ``RGB`` or ``RGBA``
image. This can be disabled or changed by setting
``Image.MAX_IMAGE_PIXELS = None``.
2017-12-30 01:44:07 +03:00
Scripts
^^^^^^^
The scripts formerly installed by Pillow have been split into a
separate package, pillow-scripts, living at
2023-10-30 09:56:42 +03:00
https://github.com/python-pillow/pillow-scripts.
2017-12-30 01:44:07 +03:00
2017-11-06 14:58:05 +03:00
API Changes
===========
OleFileIO.py
^^^^^^^^^^^^
2023-10-30 09:56:42 +03:00
The :pypi:`olefile` module is no longer a required dependency when installing Pillow.
2017-11-06 14:58:05 +03:00
Support for plugins requiring olefile will not be loaded if it is not
installed. This allows library consumers to avoid installing this dependency
if they choose. Some library consumers have little interest in the format
support and would like to keep dependencies to a minimum.
Further, the vendored version was removed in Pillow 4.0.0 and replaced with a
deprecation warning that PIL.OleFileIO would be removed in a future version.
This warning has been upgraded to an import error pending future removal.
2017-12-30 01:44:07 +03:00
Check parameter on _save
^^^^^^^^^^^^^^^^^^^^^^^^
Several image plugins supported a named ``check`` parameter on their
2017-12-30 13:41:38 +03:00
nominally private ``_save`` method to preflight if the image could be
2017-12-30 01:44:07 +03:00
saved in that format. That parameter has been removed.
2017-11-06 14:58:05 +03:00
API Additions
=============
2017-12-30 01:19:13 +03:00
Image.transform
^^^^^^^^^^^^^^^
2017-12-30 13:41:38 +03:00
A new named parameter, ``fillcolor``, has been added to
``Image.transform``. This color specifies the background color to use in
2017-12-30 01:19:13 +03:00
the area outside the transformed area in the output image. This
2017-12-30 13:41:38 +03:00
parameter takes the same color specifications as used in ``Image.new``.
2017-11-06 14:58:05 +03:00
2017-12-30 01:44:07 +03:00
GIF Disposal
^^^^^^^^^^^^
Multiframe GIF images now take an optional disposal parameter to
2018-01-27 09:04:46 +03:00
specify the disposal option for changed pixels.
2017-12-30 01:44:07 +03:00
2017-11-06 14:58:05 +03:00
Other Changes
=============
2017-12-30 01:44:07 +03:00
Compressed TIFF Images
^^^^^^^^^^^^^^^^^^^^^^
Previously, there were some compression modes (JPEG, Packbits, and
2017-12-30 13:41:38 +03:00
LZW) that were supported with Pillow's internal TIFF decoder. All
2017-12-30 01:44:07 +03:00
compressed TIFFs are now read using the ``libtiff`` decoder, as it
implements the compression schemes more correctly.
Libraqm is now Dynamically Linked
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The libraqm dependency for complex text scripts is now linked
dynamically at runtime rather than at packaging time. This allows us
to release binaries with support for libraqm if it is installed on the
2018-01-27 09:04:46 +03:00
user's machine.
2017-12-30 01:44:07 +03:00
Source Layout Changes
^^^^^^^^^^^^^^^^^^^^^
The Pillow source is now stored within the ``src`` directory of the
distribution. This prevents accidental imports of the PIL directory
2017-12-30 13:41:38 +03:00
when running Python from the project directory.
2017-12-30 01:44:07 +03:00
Setup.py Changes
^^^^^^^^^^^^^^^^
2017-12-30 13:41:38 +03:00
Multiarch support on Linux should be more robust, especially on Debian
2017-12-30 01:44:07 +03:00
derivatives on ARM platforms. Debian's multiarch platform
configuration is run in preference to the sniffing of machine platform
and architecture.