mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-05 14:10:52 +03:00
Merge branch 'fix-alpha-for-overlapping-glyphs' of ssh://github.com/ZachNagengast/Pillow into fix-alpha-for-overlapping-glyphs
This commit is contained in:
commit
a7f805d889
|
@ -15,7 +15,7 @@
|
||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
python3 setup.py build --build-base=/tmp/build install
|
python3 -m pip install .
|
||||||
|
|
||||||
# Build fuzzers in $OUT.
|
# Build fuzzers in $OUT.
|
||||||
for fuzzer in $(find $SRC -name 'fuzz_*.py'); do
|
for fuzzer in $(find $SRC -name 'fuzz_*.py'); do
|
||||||
|
|
|
@ -433,6 +433,12 @@ def test_exif_transpose_in_place():
|
||||||
assert_image_equal(im, expected)
|
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():
|
def test_autocontrast_cutoff():
|
||||||
# Test the cutoff argument of autocontrast
|
# Test the cutoff argument of autocontrast
|
||||||
with Image.open("Tests/images/bw_gradient.png") as img:
|
with Image.open("Tests/images/bw_gradient.png") as img:
|
||||||
|
|
|
@ -56,7 +56,7 @@ def _lut(image, lut):
|
||||||
lut = lut + lut + lut
|
lut = lut + lut + lut
|
||||||
return image.point(lut)
|
return image.point(lut)
|
||||||
else:
|
else:
|
||||||
msg = "not supported for this image mode"
|
msg = f"not supported for mode {image.mode}"
|
||||||
raise OSError(msg)
|
raise OSError(msg)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user