mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 12:17:14 +03:00
Merge branch 'webp-params' of https://github.com/ashafaei/Pillow into webp-params
This commit is contained in:
commit
cc44652e8f
|
@ -96,6 +96,7 @@ def test_write_rgba(tmp_path):
|
||||||
else:
|
else:
|
||||||
assert_image_similar(image, pil_image, 1.0)
|
assert_image_similar(image, pil_image, 1.0)
|
||||||
|
|
||||||
|
|
||||||
def test_write_rgba_keep_transparent(tmp_path):
|
def test_write_rgba_keep_transparent(tmp_path):
|
||||||
"""
|
"""
|
||||||
Can we write a RGBA mode file to WebP while preserving
|
Can we write a RGBA mode file to WebP while preserving
|
||||||
|
@ -111,7 +112,7 @@ def test_write_rgba_keep_transparent(tmp_path):
|
||||||
# make a single channel image with the same size as input_image
|
# make a single channel image with the same size as input_image
|
||||||
new_alpha = Image.new("L", input_image.size, 255)
|
new_alpha = Image.new("L", input_image.size, 255)
|
||||||
# make the left half transparent
|
# make the left half transparent
|
||||||
new_alpha.paste((0,), (0, 0, new_alpha.size[0]//2, new_alpha.size[1]))
|
new_alpha.paste((0,), (0, 0, new_alpha.size[0] // 2, new_alpha.size[1]))
|
||||||
# putalpha on output_image
|
# putalpha on output_image
|
||||||
output_image.putalpha(new_alpha)
|
output_image.putalpha(new_alpha)
|
||||||
|
|
||||||
|
@ -130,7 +131,6 @@ def test_write_rgba_keep_transparent(tmp_path):
|
||||||
assert_image_similar(image, input_image, 1.0)
|
assert_image_similar(image, input_image, 1.0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_write_unsupported_mode_PA(tmp_path):
|
def test_write_unsupported_mode_PA(tmp_path):
|
||||||
"""
|
"""
|
||||||
Saving a palette-based file with transparency to WebP format
|
Saving a palette-based file with transparency to WebP format
|
||||||
|
|
Loading…
Reference in New Issue
Block a user