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 08da90d
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 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,7 +49,7 @@ Other Changes
=============

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

`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
Expand Down

0 comments on commit 08da90d

Please sign in to comment.