This commit is contained in:
Alexander Karpinsky 2017-09-09 09:24:38 +00:00 committed by GitHub
commit 57fe52109a

View File

@ -7,3 +7,44 @@ 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 seperate image.
``getchannel`` should work up to 6 times faster than ``image.split()[0]``
in previous Pillow versions.
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%
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.