9.1.0 ----- 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 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 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 image. The keys of the returned dictionary are the image resource IDs. At present, the information within each block is merely returned as a dictionary with a "data" entry. This will allow more useful information to be added in the future without breaking backwards compatibility. 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 description stay the same on subsequent executions of the same code.