From b91d7c997e6264764629f1c5ce341b719d9bf6ff Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 26 Aug 2017 18:19:04 +0300 Subject: [PATCH 1/3] Release notes for my changes --- docs/releasenotes/4.3.0.rst | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/docs/releasenotes/4.3.0.rst b/docs/releasenotes/4.3.0.rst index f99226ef9..81a754186 100644 --- a/docs/releasenotes/4.3.0.rst +++ b/docs/releasenotes/4.3.0.rst @@ -7,6 +7,8 @@ Get One Channel From Image New method :py:meth:`PIL.Image.Image.getchannel` added. It returns single channel by index or name. For example, ``image.getchannel("A")`` will return alpha channel as separate image. +``getchannel`` should work up to 6 times faster than ``image.split()[0]`` +in previous Pillow versions. Removed Core Image Debugging Code ================================= @@ -14,3 +16,55 @@ Removed Core Image Debugging Code Debugging code within ``Image.core.grabclipboard`` was removed. It had been marked as ``will be removed in future versions`` since PIL. When enabled, it identified the format of the clipboard data. + + +Partial Resampling +================== + +New argument ``box`` for :py:meth:`PIL.Image.Image.resize` method allows +set rect within source image which will be resized. +This is very similar to ``image.crop(box).resize(size)`` sequence +except that ``box`` can be with subpixel accuracy. + + +Loading 16-bit TIFF Images +========================== + +Pillow now can read 16-bit multichannel TIFF files including files +with alpha transparency. Such files are converted to internal +8-bit representation. + + +Performance +=========== + +Many performance improvements were done, including: + +* Many memory bandwidth-bounded operations such as crop, image allocation, + conversion, split into bands and merging from bands + are accelerated up to 2 times +* Upscaling of multichannel images (such as RGB) is accelerated by 5-10% +* Using recent libjpeg-turbo version (most installations nowadays) + JPEG loading is accelerated up to 15% and JPEG saving up to 20% + + +Import and Export bytes on big-endian systems +============================================= + +Methods :py:func:`PIL.Image.frombytes` and :py:meth:`PIL.Image.Image.tobytes` +used to import/export bytes for ``I`` (32-bit integer) and +``F`` (32-bit float) modes in platform-specific bytes order. +Now they work in little-endian mode, which is aligned with +internal documentation and other modes. If you need native bytes order, +you should explicitly use rawmodes with native bytes order: +``I;32N`` and ``F;32N``. + + +Removed Internal Methods +======================== + +From time to time we are cleaning up our internal API, +which is however accessible from the Python code. +This time ``PIL.Image.core.copy`` and ``PIL.Image.Image.im.copy2`` methods +were removed. +>>>>>>> Release notes for my changes From d6ec5df08d0308ce6689158e91640f142bb9d162 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 28 Aug 2017 19:34:23 +0300 Subject: [PATCH 2/3] no longer true --- docs/releasenotes/4.3.0.rst | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/docs/releasenotes/4.3.0.rst b/docs/releasenotes/4.3.0.rst index 81a754186..b3dbec89f 100644 --- a/docs/releasenotes/4.3.0.rst +++ b/docs/releasenotes/4.3.0.rst @@ -48,18 +48,6 @@ Many performance improvements were done, including: JPEG loading is accelerated up to 15% and JPEG saving up to 20% -Import and Export bytes on big-endian systems -============================================= - -Methods :py:func:`PIL.Image.frombytes` and :py:meth:`PIL.Image.Image.tobytes` -used to import/export bytes for ``I`` (32-bit integer) and -``F`` (32-bit float) modes in platform-specific bytes order. -Now they work in little-endian mode, which is aligned with -internal documentation and other modes. If you need native bytes order, -you should explicitly use rawmodes with native bytes order: -``I;32N`` and ``F;32N``. - - Removed Internal Methods ======================== From 566d69483d7a5a0aa1227a9c480d7dfba9c0936d Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Sat, 9 Sep 2017 10:29:49 +0000 Subject: [PATCH 3/3] rewording --- docs/releasenotes/4.3.0.rst | 46 +++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/docs/releasenotes/4.3.0.rst b/docs/releasenotes/4.3.0.rst index b3dbec89f..4708eeb29 100644 --- a/docs/releasenotes/4.3.0.rst +++ b/docs/releasenotes/4.3.0.rst @@ -10,49 +10,45 @@ It returns single channel by index or name. For example, ``getchannel`` should work up to 6 times faster than ``image.split()[0]`` in previous Pillow versions. -Removed Core Image Debugging Code -================================= - -Debugging code within ``Image.core.grabclipboard`` was removed. It had been -marked as ``will be removed in future versions`` since PIL. When enabled, it -identified the format of the clipboard data. - Partial Resampling ================== -New argument ``box`` for :py:meth:`PIL.Image.Image.resize` method allows -set rect within source image which will be resized. -This is very similar to ``image.crop(box).resize(size)`` sequence -except that ``box`` can be with subpixel accuracy. +Added new argument ``box`` for :py:meth:`PIL.Image.Image.resize`. This +argument defines a source rectangle from within the source image to be +resized. This is very similar to the ``image.crop(box).resize(size)`` +sequence except that ``box`` can be specified with subpixel accuracy. Loading 16-bit TIFF Images ========================== Pillow now can read 16-bit multichannel TIFF files including files -with alpha transparency. Such files are converted to internal -8-bit representation. +with alpha transparency. The image data is truncated to 8-bit +precision. Performance =========== -Many performance improvements were done, including: +This release contains several performance improvements: * Many memory bandwidth-bounded operations such as crop, image allocation, - conversion, split into bands and merging from bands - are accelerated up to 2 times + conversion, split into bands and merging from bands are up to 2x faster. * Upscaling of multichannel images (such as RGB) is accelerated by 5-10% -* Using recent libjpeg-turbo version (most installations nowadays) - JPEG loading is accelerated up to 15% and JPEG saving up to 20% +* JPEG loading is accelerated up to 15% and JPEG saving up to 20% when + using a recent version of libjpeg-turbo. -Removed Internal Methods -======================== +Core Image API Changes +====================== -From time to time we are cleaning up our internal API, -which is however accessible from the Python code. -This time ``PIL.Image.core.copy`` and ``PIL.Image.Image.im.copy2`` methods -were removed. ->>>>>>> Release notes for my changes +These are internal functions that should not have been used by user +code, but they were accessible from the python layer. + +Debugging code within ``Image.core.grabclipboard`` was removed. It had been +marked as ``will be removed in future versions`` since PIL. When enabled, it +identified the format of the clipboard data. + +The ``PIL.Image.core.copy`` and ``PIL.Image.Image.im.copy2`` methods +have been removed.