Pillow/docs/releasenotes/5.2.0.rst

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

114 lines
3.6 KiB
ReStructuredText
Raw Normal View History

2018-04-06 23:57:25 +03:00
5.2.0
2018-04-05 13:52:58 +03:00
-----
2018-04-11 16:03:52 +03:00
API Changes
===========
Deprecations
^^^^^^^^^^^^
These version constants have been deprecated. ``VERSION`` will be removed in
Pillow 6.0.0, and ``PILLOW_VERSION`` will be removed after that.
2018-04-11 17:02:24 +03:00
* ``PIL.VERSION`` (old PIL version 1.1.7)
* ``PIL.PILLOW_VERSION``
* ``PIL.Image.VERSION``
* ``PIL.Image.PILLOW_VERSION``
2018-04-15 10:37:50 +03:00
Use ``PIL.__version__`` instead.
2018-04-11 16:03:52 +03:00
2018-04-05 13:52:58 +03:00
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")``
2018-04-05 13:52:58 +03:00
Image.rotate
^^^^^^^^^^^^
A new named parameter, ``fillcolor``, has been added to ``Image.rotate``. This
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).
2018-04-05 13:52:58 +03:00
Other Changes
=============
Support added for Python 3.7
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pillow 5.2 supports Python 3.7.
2018-06-16 13:59:36 +03:00
Build macOS wheels with Xcode 6.4, supporting older macOS versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The macOS wheels for Pillow 5.1.0 were built with Xcode 9.2, meaning 10.12
Sierra was the lowest supported version.
Prior to Pillow 5.1.0, Xcode 8 was used, supporting El Capitan 10.11.
Instead, Pillow 5.2.0 is built with the oldest available Xcode 6.4 to support
at least 10.10 Yosemite.
Fix _i2f compilation with some GCC versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For example, this allows compilation with GCC 4.8 on NetBSD.
Resolve confusion getting PIL / Pillow version string
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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
2022-09-24 12:41:30 +03:00
- ReadTheDocs documentation is missing for some version branches (why is this, will it ever change, ...)
- 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)
2018-07-01 19:56:04 +03:00
- PIL._version module documentation comment could explain how to access the version information
2018-07-01 19:56:04 +03:00
We have attempted to resolve these issues in #3083, #3090 and #3218.