Skip to content

Commit 07ce239

Browse files
authored
Merge pull request #3220 from python-pillow/release-notes-5-2-0
5.2.0 release notes
2 parents c222df2 + a2c6a5a commit 07ce239

File tree

3 files changed

+86
-9
lines changed

3 files changed

+86
-9
lines changed

CHANGES.rst

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,42 @@
22
Changelog (Pillow)
33
==================
44

5-
5.2.0 (unreleased)
5+
5.2.0 (2018-07-01)
66
------------------
77

8+
- Fixed saving a multiframe image as a single frame PDF #3137
9+
[radarhere]
10+
11+
- If a Qt version is already imported, attempt to use it first #3143
12+
[radarhere]
13+
14+
- Fix transform fill color for alpha images #3147
15+
[fozcode]
16+
17+
- TGA: Add support for writing RLE data #3186
18+
[danpla]
19+
20+
- TGA: Read and write LA data #3178
21+
[danpla]
22+
23+
- QuantOctree.c: Remove erroneous attempt to average over an empty range #3196
24+
[tkoeppe]
25+
26+
- Changed ICNS format tests to pass on OS X 10.11 #3202
27+
[radarhere]
28+
29+
- Fixed bug in ImageDraw.multiline_textsize() #3114
30+
[tianyu139]
31+
32+
- Added getsize_multiline support for PIL.ImageFont #3113
33+
[tianyu139]
34+
35+
- Added ImageFile get_format_mimetype method #3190
36+
[radarhere]
37+
38+
- Changed mmap file pointer to use context manager #3216
39+
[radarhere]
40+
841
- Changed ellipse point calculations to be more evenly distributed #3142
942
[radarhere]
1043

docs/handbook/image-file-formats.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,8 @@ TGA
562562
^^^
563563

564564
PIL reads and writes TGA images containing ``L``, ``LA``, ``P``,
565-
``RGB``, and ``RGBA`` data. PIL can read both uncompressed and
566-
run-length encoded TGAs, but writes only uncompressed data.
565+
``RGB``, and ``RGBA`` data. PIL can read and write both uncompressed and
566+
run-length encoded TGAs.
567567

568568
TIFF
569569
^^^^

docs/releasenotes/5.2.0.rst

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,49 @@ Pillow 6.0.0, and ``PILLOW_VERSION`` will be removed after that.
1717

1818
Use ``PIL.__version__`` instead.
1919

20-
2120
API Additions
2221
=============
2322

23+
3D color lookup tables
24+
^^^^^^^^^^^^^^^^^^^^^^
25+
26+
Support for 3D color lookup table transformations has been added.
27+
28+
* https://en.wikipedia.org/wiki/3D_lookup_table
29+
30+
``Color3DLUT.generate`` transforms 3-channel pixels using the values of the
31+
channels as coordinates in the 3D lookup table and interpolating the nearest
32+
elements.
33+
34+
It allows you to apply almost any color transformation in constant time by
35+
using pre-calculated decimated tables.
36+
37+
``Color3DLUT.transform()`` allows altering table values with a callback.
38+
39+
If NumPy is installed, the performance of argument conversion is dramatically
40+
improved when a source table supports buffer interface (NumPy && arrays in
41+
Python >= 3).
42+
43+
ImageColor.getrgb
44+
^^^^^^^^^^^^^^^^^
45+
46+
Previously ``Image.rotate`` only supported HSL color strings. Now HSB and HSV
47+
strings are also supported, as well as float values. For example,
48+
``ImageColor.getrgb("hsv(180,100%,99.5%)")``.
49+
50+
ImageFile.get_format_mimetype
51+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52+
53+
``ImageFile.get_format_mimetype`` has been added to return the MIME type of an
54+
image file, where available. For example,
55+
``Image.open("hopper.jpg").get_format_mimetype()`` returns ``"image/jpeg"``.
56+
57+
ImageFont.getsize_multiline
58+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
59+
60+
A new method to return the size of multiline text, for example
61+
``font.getsize_multiline("ABC\nAaaa")``
62+
2463
Image.rotate
2564
^^^^^^^^^^^^
2665

@@ -29,6 +68,13 @@ color specifies the background color to use in the area outside the rotated
2968
image. This parameter takes the same color specifications as used in
3069
``Image.new``.
3170

71+
72+
TGA file format
73+
^^^^^^^^^^^^^^^
74+
75+
Pillow can now read and write LA data (in addition to L, P, RGB and RGBA), and
76+
write RLE data (in addition to uncompressed).
77+
3278
Other Changes
3379
=============
3480

@@ -56,14 +102,12 @@ For example, this allows compilation with GCC 4.8 on NetBSD.
56102
Resolve confusion getting PIL / Pillow version string
57103
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
58104

59-
As user gnbl notes in #3082:
105+
Re: "version constants deprecated" listed above, as user gnbl notes in #3082:
60106

61107
- it's confusing that PIL.VERSION returns the version string of the former PIL instead of Pillow's
62108
- 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
63109
- it's confusing that PIL.version is a module and does not return the version information directly or hints on how to get it
64110
- the package information header is essentially useless (placeholder, does not even mention Pillow, nor the version)
65-
- PIL.version module documentation comment could explain how to access the version information
66-
67-
We have attempted to resolve these issues here:
111+
- PIL._version module documentation comment could explain how to access the version information
68112

69-
- https://github.com/python-pillow/Pillow/pull/3218
113+
We have attempted to resolve these issues in #3083, #3090 and #3218.

0 commit comments

Comments
 (0)