mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-13 17:25:49 +03:00
Documented ImageOps contain method
This commit is contained in:
parent
d22fe41776
commit
b432f838f1
|
@ -12,6 +12,7 @@ only work on L and RGB images.
|
|||
|
||||
.. autofunction:: autocontrast
|
||||
.. autofunction:: colorize
|
||||
.. autofunction:: contain
|
||||
.. autofunction:: pad
|
||||
.. autofunction:: crop
|
||||
.. autofunction:: scale
|
||||
|
|
49
docs/releasenotes/8.3.0.rst
Normal file
49
docs/releasenotes/8.3.0.rst
Normal file
|
@ -0,0 +1,49 @@
|
|||
8.3.0
|
||||
-----
|
||||
|
||||
Deprecations
|
||||
============
|
||||
|
||||
TODO
|
||||
^^^^
|
||||
|
||||
TODO
|
||||
|
||||
API Changes
|
||||
===========
|
||||
|
||||
TODO
|
||||
^^^^
|
||||
|
||||
TODO
|
||||
|
||||
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:
|
||||
- :py:meth:`~PIL.ImageOps.fit` expands an image until is fills ``size``, cropping the
|
||||
parts of the image that do not fit.
|
||||
- :py:meth:`~PIL.ImageOps.pad` expands an image to fill ``size``, without cropping, but
|
||||
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``.
|
||||
|
||||
Security
|
||||
========
|
||||
|
||||
TODO
|
||||
|
||||
Other Changes
|
||||
=============
|
||||
|
||||
TODO
|
||||
^^^^
|
||||
|
||||
TODO
|
Loading…
Reference in New Issue
Block a user