From 14ae66f63d0906b87085275f6dc89f313048f45d Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 3 Apr 2017 13:21:32 -0700 Subject: [PATCH] Release notes for 4.1.0 --- docs/releasenotes/4.1.0.rst | 86 +++++++++++++++++++++++++++++++++++++ docs/releasenotes/index.rst | 1 + 2 files changed, 87 insertions(+) create mode 100644 docs/releasenotes/4.1.0.rst diff --git a/docs/releasenotes/4.1.0.rst b/docs/releasenotes/4.1.0.rst new file mode 100644 index 000000000..b57385cdb --- /dev/null +++ b/docs/releasenotes/4.1.0.rst @@ -0,0 +1,86 @@ +4.1.0 +----- + +Removed Deprecated Items +======================== + +Several deprecated items have been removed. + +* Support for spaces in tiff kwargs the parameters for 'x resolution', 'y + resolution', 'resolution unit', and 'date time' has been + removed. Underscores should be used instead. + +* The methods :py:meth:`PIL.ImageDraw.ImageDraw.setink`, + :py:meth:`PIL.ImageDraw.ImageDraw.setfill`, and + :py:meth:`PIL.ImageDraw.ImageDraw.setfont` have been removed. + + +Closing Files When Opening Images +================================= + +The file handling when opening images has been overhauled. Previously, +there Pillow would attempt to close some, but not all image formats +after loading the image data, but not all. Now, the following behavior +is specified: + +* For images where an open file is passed in, it is the + responsibility of the calling code to close the file. + +* For images where Pillow opens the file and the file is known to have + only one frame, the file is closed after loading. + +* If the file has more than one frame, or if it can't be determined, + then the file is left open to permit seeking to subsequent + frames. It will be closed, eventually, in the ``close`` or + ``__del__`` methods + +* If the image is memory mapped, then we can't close the mapping to + the underlying file until we are done with the image. The mapping + will be closed in the ``close`` or ``__del__`` method. + + +Changes to GIF Handling When Saving +=================================== + +The :py:class:`PIL.GifImagePlugin` code has been refactored to fix the flow when +saving images. There are two external changes that arise from this: + +* An :py:class:`PIL.ImagePalette.ImagePalette` object is now accepted + as a specified palette argument in :py:meth:`PIL.Image.Image.save()`. + +* The image to be saved is no longer modified in place by any of the + operations of the save function. Previously it was modified when + optimizing the image palette. + +This refactor fixed some bugs with palette handling when saving +multiple frame GIFs. + +New Method: Image.remap_palette +=============================== + +The method :py:meth:`PIL.Image.Image.remap_palette()` has been +added. This method was hoisted from the GifImagePlugin code used to +optimize the palette. + +Added Decoder Registry and Support for Python Based Decoders +============================================================ + +There is now a decoder registry similar to the image plugin +registries. Image plugins can register a decoder, and it will be +called when the decoding is requested. This allows for the creation of +pure Python decoders. While the python decoders will not be as fast as +their C based counterparts, they may be easier and quicker to develop +or safer to run. + +Tests +===== + +Many tests have been added, including correctness tests for image +formats that have been previously untested. + +We are now running automated tests in Docker containers against more +Linux versions than are provided on TravisCi, which is currently +Ubuntu 14.04 x64. This Pillow release is tested on 64 bit Alpine, +Arch, Ubuntu 12.04 and 16.04, and 32 bit Debian Stretch and Ubuntu +14.04. This also covers a wider range of dependency versions than are +provided on Travis natively. diff --git a/docs/releasenotes/index.rst b/docs/releasenotes/index.rst index e32bf7e40..1dd6eb8af 100644 --- a/docs/releasenotes/index.rst +++ b/docs/releasenotes/index.rst @@ -6,6 +6,7 @@ Release Notes .. toctree:: :maxdepth: 2 + 4.1.0 4.0.0 3.4.0 3.3.2