Merge branch 'main' into fix-alpha-for-overlapping-glyphs

This commit is contained in:
Andrew Murray 2023-10-28 00:41:41 +11:00
commit 76f758e1ef
3 changed files with 8 additions and 2 deletions

View File

@ -15,7 +15,7 @@
#
################################################################################
python3 setup.py build --build-base=/tmp/build install
python3 -m pip install .
# Build fuzzers in $OUT.
for fuzzer in $(find $SRC -name 'fuzz_*.py'); do

View File

@ -433,6 +433,12 @@ def test_exif_transpose_in_place():
assert_image_equal(im, expected)
def test_autocontrast_unsupported_mode():
im = Image.new("RGBA", (1, 1))
with pytest.raises(OSError):
ImageOps.autocontrast(im)
def test_autocontrast_cutoff():
# Test the cutoff argument of autocontrast
with Image.open("Tests/images/bw_gradient.png") as img:

View File

@ -56,7 +56,7 @@ def _lut(image, lut):
lut = lut + lut + lut
return image.point(lut)
else:
msg = "not supported for this image mode"
msg = f"not supported for mode {image.mode}"
raise OSError(msg)