Skip to content

Commit a2c6a5a

Browse files
committed
Update CHANGES, image-file-formats and release notes [CI skip]
1 parent c4f43b5 commit a2c6a5a

File tree

3 files changed

+83
-3
lines changed

3 files changed

+83
-3
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: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,46 @@ Use ``PIL.__version__`` instead.
2020
API Additions
2121
=============
2222

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+
2363
Image.rotate
2464
^^^^^^^^^^^^
2565

@@ -28,6 +68,13 @@ color specifies the background color to use in the area outside the rotated
2868
image. This parameter takes the same color specifications as used in
2969
``Image.new``.
3070

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+
3178
Other Changes
3279
=============
3380

0 commit comments

Comments
 (0)