mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-29 23:17:49 +03:00 
			
		
		
		
	Merge branch 'main' into fix-alpha-for-overlapping-glyphs
This commit is contained in:
		
						commit
						76f758e1ef
					
				|  | @ -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