From a2c6a5a38e0a9c63ae51fea98de3823fc540ef82 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 1 Jul 2018 22:24:35 +0300 Subject: [PATCH] Update CHANGES, image-file-formats and release notes [CI skip] --- CHANGES.rst | 35 ++++++++++++++++++++- docs/handbook/image-file-formats.rst | 4 +-- docs/releasenotes/5.2.0.rst | 47 ++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 1e14e32bd..0c31eb3c7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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] diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst index ae077a649..1b0661df1 100644 --- a/docs/handbook/image-file-formats.rst +++ b/docs/handbook/image-file-formats.rst @@ -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 ^^^^ diff --git a/docs/releasenotes/5.2.0.rst b/docs/releasenotes/5.2.0.rst index bceb43d25..75e8da655 100644 --- a/docs/releasenotes/5.2.0.rst +++ b/docs/releasenotes/5.2.0.rst @@ -20,6 +20,46 @@ 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 ^^^^^^^^^^^^ @@ -28,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 =============