Merge pull request #3220 from python-pillow/release-notes-5-2-0

5.2.0 release notes
This commit is contained in:
Hugo 2018-07-01 22:26:19 +03:00 committed by GitHub
commit 07ce239a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 86 additions and 9 deletions

View File

@ -2,9 +2,42 @@
Changelog (Pillow)
==================
5.2.0 (unreleased)
5.2.0 (2018-07-01)
------------------
- Fixed saving a multiframe image as a single frame PDF #3137
[radarhere]
- If a Qt version is already imported, attempt to use it first #3143
[radarhere]
- Fix transform fill color for alpha images #3147
[fozcode]
- TGA: Add support for writing RLE data #3186
[danpla]
- TGA: Read and write LA data #3178
[danpla]
- QuantOctree.c: Remove erroneous attempt to average over an empty range #3196
[tkoeppe]
- Changed ICNS format tests to pass on OS X 10.11 #3202
[radarhere]
- Fixed bug in ImageDraw.multiline_textsize() #3114
[tianyu139]
- Added getsize_multiline support for PIL.ImageFont #3113
[tianyu139]
- Added ImageFile get_format_mimetype method #3190
[radarhere]
- Changed mmap file pointer to use context manager #3216
[radarhere]
- Changed ellipse point calculations to be more evenly distributed #3142
[radarhere]

View File

@ -562,8 +562,8 @@ TGA
^^^
PIL reads and writes TGA images containing ``L``, ``LA``, ``P``,
``RGB``, and ``RGBA`` data. PIL can read both uncompressed and
run-length encoded TGAs, but writes only uncompressed data.
``RGB``, and ``RGBA`` data. PIL can read and write both uncompressed and
run-length encoded TGAs.
TIFF
^^^^

View File

@ -17,10 +17,49 @@ Pillow 6.0.0, and ``PILLOW_VERSION`` will be removed after that.
Use ``PIL.__version__`` instead.
API Additions
=============
3D color lookup tables
^^^^^^^^^^^^^^^^^^^^^^
Support for 3D color lookup table transformations has been added.
* https://en.wikipedia.org/wiki/3D_lookup_table
``Color3DLUT.generate`` transforms 3-channel pixels using the values of the
channels as coordinates in the 3D lookup table and interpolating the nearest
elements.
It allows you to apply almost any color transformation in constant time by
using pre-calculated decimated tables.
``Color3DLUT.transform()`` allows altering table values with a callback.
If NumPy is installed, the performance of argument conversion is dramatically
improved when a source table supports buffer interface (NumPy && arrays in
Python >= 3).
ImageColor.getrgb
^^^^^^^^^^^^^^^^^
Previously ``Image.rotate`` only supported HSL color strings. Now HSB and HSV
strings are also supported, as well as float values. For example,
``ImageColor.getrgb("hsv(180,100%,99.5%)")``.
ImageFile.get_format_mimetype
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``ImageFile.get_format_mimetype`` has been added to return the MIME type of an
image file, where available. For example,
``Image.open("hopper.jpg").get_format_mimetype()`` returns ``"image/jpeg"``.
ImageFont.getsize_multiline
^^^^^^^^^^^^^^^^^^^^^^^^^^^
A new method to return the size of multiline text, for example
``font.getsize_multiline("ABC\nAaaa")``
Image.rotate
^^^^^^^^^^^^
@ -29,6 +68,13 @@ color specifies the background color to use in the area outside the rotated
image. This parameter takes the same color specifications as used in
``Image.new``.
TGA file format
^^^^^^^^^^^^^^^
Pillow can now read and write LA data (in addition to L, P, RGB and RGBA), and
write RLE data (in addition to uncompressed).
Other Changes
=============
@ -56,14 +102,12 @@ For example, this allows compilation with GCC 4.8 on NetBSD.
Resolve confusion getting PIL / Pillow version string
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As user gnbl notes in #3082:
Re: "version constants deprecated" listed above, as user gnbl notes in #3082:
- it's confusing that PIL.VERSION returns the version string of the former PIL instead of Pillow's
- there does not seem to be documentation on this version number (why this, will it ever change, ..) e.g. at https://pillow.readthedocs.io/en/5.1.x/about.html#why-a-fork
- it's confusing that PIL.version is a module and does not return the version information directly or hints on how to get it
- the package information header is essentially useless (placeholder, does not even mention Pillow, nor the version)
- PIL.version module documentation comment could explain how to access the version information
- PIL._version module documentation comment could explain how to access the version information
We have attempted to resolve these issues here:
- https://github.com/python-pillow/Pillow/pull/3218
We have attempted to resolve these issues in #3083, #3090 and #3218.