mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Added test for non-colormap 16-bit image
This commit is contained in:
parent
6ee41897e2
commit
6863c87c01
BIN
Tests/images/rgba16.tga
Normal file
BIN
Tests/images/rgba16.tga
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 B |
|
@ -81,6 +81,14 @@ def test_palette_depth_16(tmp_path: Path) -> None:
|
|||
assert_image_equal_tofile(reloaded.convert("RGBA"), "Tests/images/p_16.png")
|
||||
|
||||
|
||||
def test_rgba_16() -> None:
|
||||
with Image.open("Tests/images/rgba16.tga") as im:
|
||||
assert im.mode == "RGBA"
|
||||
|
||||
assert im.getpixel((0, 0)) == (172, 0, 255, 255)
|
||||
assert im.getpixel((1, 0)) == (0, 255, 82, 0)
|
||||
|
||||
|
||||
def test_id_field() -> None:
|
||||
# tga file with id field
|
||||
test_file = "Tests/images/tga_id_field.tga"
|
||||
|
|
Loading…
Reference in New Issue
Block a user