mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-03 19:45:56 +03:00
Documented #5414
This commit is contained in:
parent
5b0031c9fa
commit
c062410985
|
@ -25,6 +25,12 @@ Pillow 7.0 changed the default resampling filter to ``Image.BICUBIC``. However,
|
||||||
is not supported yet for images with a custom number of bits, the default filter for
|
is not supported yet for images with a custom number of bits, the default filter for
|
||||||
those modes has been reverted to ``Image.NEAREST``.
|
those modes has been reverted to ``Image.NEAREST``.
|
||||||
|
|
||||||
|
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`.
|
||||||
|
|
||||||
API Additions
|
API Additions
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
@ -35,13 +41,14 @@ Returns a resized version of the image, set to the maximum width and height with
|
||||||
``size``, while maintaining the original aspect ratio.
|
``size``, while maintaining the original aspect ratio.
|
||||||
|
|
||||||
To compare it to other ImageOps methods:
|
To compare it to other ImageOps methods:
|
||||||
|
|
||||||
- :py:meth:`~PIL.ImageOps.fit` expands an image until is fills ``size``, cropping the
|
- :py:meth:`~PIL.ImageOps.fit` expands an image until is fills ``size``, cropping the
|
||||||
parts of the image that do not fit.
|
parts of the image that do not fit.
|
||||||
- :py:meth:`~PIL.ImageOps.pad` expands an image to fill ``size``, without cropping, but
|
- :py:meth:`~PIL.ImageOps.pad` expands an image to fill ``size``, without cropping, but
|
||||||
instead filling the extra space with ``color``.
|
instead filling the extra space with ``color``.
|
||||||
- :py:meth:`~PIL.ImageOps.contain` is similar to :py:meth:`~PIL.ImageOps.pad`, but
|
- :py:meth:`~PIL.ImageOps.contain` is similar to :py:meth:`~PIL.ImageOps.pad`, but it
|
||||||
it does not fill the extra space. Instead, the original aspect ratio is maintained. So
|
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``.
|
unlike the other two methods, it is not guaranteed to return an image of ``size``.
|
||||||
|
|
||||||
Security
|
Security
|
||||||
========
|
========
|
||||||
|
|
|
@ -14,6 +14,7 @@ expected to be backported to earlier versions.
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
|
8.3.0
|
||||||
8.2.0
|
8.2.0
|
||||||
8.1.2
|
8.1.2
|
||||||
8.1.1
|
8.1.1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user