Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release notes for #3608, #3861 and #3886 #3930

Merged
merged 4 commits into from Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.rst
Expand Up @@ -5,6 +5,12 @@ Changelog (Pillow)
6.1.0 (unreleased)
------------------

- Deprecate Image.__del__ #3929
[jdufresne]

- Tiff: Add support for JPEG quality #3886
[olt]

- Respect the PKG_CONFIG environment variable when building #3928
[chewi]

Expand Down
42 changes: 40 additions & 2 deletions docs/releasenotes/6.1.0.rst
Expand Up @@ -30,6 +30,14 @@ Use instead:
API Additions
=============

Image.entropy
^^^^^^^^^^^^^
Calculates and returns the entropy for the image. A bilevel image (mode "1") is treated
as a greyscale ("L") image by this method. If a mask is provided, the method employs
the histogram for those parts of the image where the mask image is non-zero. The mask
image must have the same size as the image, and be either a bi-level image (mode "1") or
a greyscale image ("L").

ImageGrab.grab
^^^^^^^^^^^^^^

Expand Down Expand Up @@ -66,8 +74,38 @@ ImageTk.getimage
This function is now supported. It returns the contents of an ``ImageTk.PhotoImage`` as
an RGBA ``Image.Image`` instance.

Top To Bottom Complex Text Rendering
Image quality for JPEG compressed TIFF
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The TIFF encoder accepts a ``quality`` parameter for ``jpeg`` compressed TIFF files. A
value from 0 (worst) to 100 (best) controls the image quality, similar to the JPEG
encoder. The default is 75. For example:

.. code-block:: python

im.save("out.tif", compression="jpeg", quality=85)

Improve encoding of TIFF tags
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The TIFF encoder supports more types, especially arrays. This is required for the
GeoTIFF format which encodes geospatial information.

* Pass ``tagtype`` from v2 directory to libtiff encoder, instead of autodetecting type.
* Use explicit types eg. ``uint32_t`` for ``TIFF_LONG`` to fix issues on platforms with
64-bit longs.
* Add support for multiple values (arrays). Requires type in v2 directory and values
must be passed as a tuple.
* Add support for signed types eg. ``TIFFTypes.TIFF_SIGNED_SHORT``.

Respect PKG_CONFIG environment variable when building
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This variable is commonly used by other build systems and using it can help with
cross-compiling. Falls back to ``pkg-config`` as before.

Top-to-bottom complex text rendering
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Drawing text in the 'ttb' direction with ImageFont has been significantly improved
Drawing text in the 'ttb' direction with ``ImageFont`` has been significantly improved
and requires Raqm 0.7 or greater.