mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-28 17:03:13 +03:00
Update src/PIL/ImageOps.py
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
parent
8fad541531
commit
665b414033
|
@ -79,10 +79,7 @@ def autocontrast(image, cutoff=0, ignore=None, mask=None):
|
||||||
for histogram computation.
|
for histogram computation.
|
||||||
:return: An image.
|
:return: An image.
|
||||||
"""
|
"""
|
||||||
if mask:
|
|
||||||
histogram = image.histogram(mask)
|
histogram = image.histogram(mask)
|
||||||
else:
|
|
||||||
histogram = image.histogram()
|
|
||||||
lut = []
|
lut = []
|
||||||
for layer in range(0, len(histogram), 256):
|
for layer in range(0, len(histogram), 256):
|
||||||
h = histogram[layer : layer + 256]
|
h = histogram[layer : layer + 256]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user