added test

This commit is contained in:
Hamza 2020-07-01 04:01:06 +05:00
parent fb2a184eed
commit b768cc09d7

View File

@ -300,3 +300,9 @@ def test_exif_transpose():
"Tests/images/hopper_orientation_" + str(i) + ext
) as orientation_im:
check(orientation_im)
def test_autocontrast_cutoff():
# Test the cutoff argument of autocontrast
with Image.open("Tests/images/bw_gradient.png") as img:
assert ImageOps.autocontrast(img, cutoff=10).getdata() == ImageOps.autocontrast(img, cutoff=(10,10)).getdata()
assert ImageOps.autocontrast(img, cutoff=10).getdata() != ImageOps.autocontrast(img, cutoff=(1,10)).getdata()