Skip to content

Commit

Permalink
Added release notes for python-pillow#5959
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Feb 10, 2022
1 parent 9122962 commit 8b6ee68
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions docs/releasenotes/9.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,37 @@ API Changes
===========

Raise an error when performing a negative crop
----------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Performing a negative crop on an image previously just returned a `(0, 0)` image. Now
it will raise a `ValueError`, to help reduce confusion if a user has unintentionally
Performing a negative crop on an image previously just returned a ``(0, 0)`` image. Now
it will raise a ``ValueError``, to help reduce confusion if a user has unintentionally
provided the wrong arguments.

Added specific error if path coordinate type is incorrect
---------------------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Rather than returning a `SystemError`, passing the incorrect types of coordinates into
a path will now raise a more specific `ValueError`, with the message "incorrect
Rather than returning a ``SystemError``, passing the incorrect types of coordinates into
a path will now raise a more specific ``ValueError``, with the message "incorrect
coordinate type".

Deprecations
^^^^^^^^^^^^

ImageShow.Viewer.show_file file argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ``file`` argument in :py:meth:`~PIL.ImageShow.Viewer.show_file()` has been
deprecated, replaced by ``path``.

In effect, ``viewer.show_file("test.jpg")`` will continue to work unchanged.
``viewer.show_file(file="test.jpg")`` will raise a deprecation warning, and suggest
``viewer.show_file(path="test.jpg")`` instead.

API Additions
=============

Added get_photoshop_blocks() to parse Photoshop TIFF tag
--------------------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:py:meth:`~PIL.TiffImagePlugin.TiffImageFile.get_photoshop_blocks` has been added, to
allow users to determine what Photoshop "Image Resource Blocks" are contained within an
Expand All @@ -36,8 +49,8 @@ Other Changes
=============

Image._repr_pretty_
-------------------
^^^^^^^^^^^^^^^^^^^

`im._repr_pretty_` has been added to provide a representation of an image without the
``im._repr_pretty_`` has been added to provide a representation of an image without the
identity of the object. This allows Jupyter to describe an image and have that
description stay the same on subsequent executions of the same code.

0 comments on commit 8b6ee68

Please sign in to comment.