mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-16 11:12:29 +03:00
ENH: Autocontrast - Code review feedback
This commit is contained in:
parent
ca3796f4f6
commit
fa493809a6
|
@ -1,5 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
from PIL import Image, ImageOps, ImageDraw, features
|
from PIL import Image, ImageDraw, ImageOps, features
|
||||||
|
|
||||||
from .helper import (
|
from .helper import (
|
||||||
assert_image_equal,
|
assert_image_equal,
|
||||||
|
@ -315,7 +315,7 @@ def test_autocontrast_cutoff():
|
||||||
assert autocontrast(10) != autocontrast((1, 10))
|
assert autocontrast(10) != autocontrast((1, 10))
|
||||||
|
|
||||||
|
|
||||||
def test_autocontrast_mask():
|
def test_autocontrast_mask_toy_input():
|
||||||
# Test the mask argument of autocontrast
|
# Test the mask argument of autocontrast
|
||||||
with Image.open("Tests/images/bw_gradient.png") as img:
|
with Image.open("Tests/images/bw_gradient.png") as img:
|
||||||
|
|
||||||
|
@ -327,6 +327,8 @@ def test_autocontrast_mask():
|
||||||
|
|
||||||
assert ImageOps.autocontrast(img, mask=rect_mask) != ImageOps.autocontrast(img)
|
assert ImageOps.autocontrast(img, mask=rect_mask) != ImageOps.autocontrast(img)
|
||||||
|
|
||||||
|
|
||||||
|
def test_auto_contrast_mask_real_input():
|
||||||
# Test the autocontrast with a rectangular mask
|
# Test the autocontrast with a rectangular mask
|
||||||
with Image.open("Tests/images/iptc.jpg") as img:
|
with Image.open("Tests/images/iptc.jpg") as img:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user