versionadded directive and releasenotes added

This commit is contained in:
elejke 2021-03-23 13:56:51 +03:00
parent 694d70bdc3
commit 9b8f7c2a8f
2 changed files with 12 additions and 0 deletions

View File

@ -73,6 +73,15 @@ be specified through a keyword argument::
im.save("out.tif", icc_profile=...) im.save("out.tif", icc_profile=...)
ImageOps.autocontrast: tone preserving option
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The default behaviour of the :py:meth:`~PIL.ImageOps.autocontrast` is to normalize separate
histograms for each color channel, it changes tone of the image. Added ``preserve_tone``
argument which avoids changing the tone of the image using one luminance histogram for all
channels.
Security Security
======== ========

View File

@ -78,6 +78,9 @@ def autocontrast(image, cutoff=0, ignore=None, mask=None, preserve_tone=False):
within the mask. If no mask is given the entire image is used within the mask. If no mask is given the entire image is used
for histogram computation. for histogram computation.
:param preserve_tone: Preserve image tone in Photoshop-like style autocontrast. :param preserve_tone: Preserve image tone in Photoshop-like style autocontrast.
.. versionadded:: 1.1.5
:return: An image. :return: An image.
""" """
if preserve_tone: if preserve_tone: