Pillow/docs/releasenotes/8.3.0.rst

65 lines
1.7 KiB
ReStructuredText
Raw Normal View History

2021-05-01 15:53:46 +03:00
8.3.0
-----
Deprecations
============
TODO
^^^^
TODO
API Changes
===========
2021-05-01 16:08:49 +03:00
Changed WebP default "method" value when saving
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2021-05-01 15:53:46 +03:00
2021-05-01 16:08:49 +03:00
Previously, it was 0, for the best speed. The default has now been changed to 4, to
match WebP's default, for higher quality with still some speed optimisation.
2021-05-01 15:53:46 +03:00
2021-05-01 16:09:20 +03:00
Default resampling filter for special image modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pillow 7.0 changed the default resampling filter to ``Image.BICUBIC``. However, as this
is not supported yet for images with a custom number of bits, the default filter for
those modes has been reverted to ``Image.NEAREST``.
2021-05-01 16:44:09 +03:00
ImageMorph incorrect mode errors
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For ``apply()``, ``match()`` and ``get_on_pixels()``, if the image mode is not L, an
:py:exc:`Exception` was thrown. This has now been changed to a :py:exc:`ValueError`.
2021-05-01 15:53:46 +03:00
API Additions
=============
ImageOps.contain
^^^^^^^^^^^^^^^^
Returns a resized version of the image, set to the maximum width and height within
``size``, while maintaining the original aspect ratio.
To compare it to other ImageOps methods:
2021-05-01 16:44:09 +03:00
2021-05-01 15:53:46 +03:00
- :py:meth:`~PIL.ImageOps.fit` expands an image until is fills ``size``, cropping the
2021-05-01 16:44:09 +03:00
parts of the image that do not fit.
2021-05-01 15:53:46 +03:00
- :py:meth:`~PIL.ImageOps.pad` expands an image to fill ``size``, without cropping, but
2021-05-01 16:44:09 +03:00
instead filling the extra space with ``color``.
- :py:meth:`~PIL.ImageOps.contain` is similar to :py:meth:`~PIL.ImageOps.pad`, but it
does not fill the extra space. Instead, the original aspect ratio is maintained. So
unlike the other two methods, it is not guaranteed to return an image of ``size``.
2021-05-01 15:53:46 +03:00
Security
========
TODO
Other Changes
=============
TODO
^^^^
TODO