Skip to content

Commit 6863c87

Browse files
radarhereYay295
authored andcommitted
Added test for non-colormap 16-bit image
1 parent 6ee4189 commit 6863c87

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Tests/images/rgba16.tga

48 Bytes
Binary file not shown.

Tests/test_file_tga.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ def test_palette_depth_16(tmp_path: Path) -> None:
8181
assert_image_equal_tofile(reloaded.convert("RGBA"), "Tests/images/p_16.png")
8282

8383

84+
def test_rgba_16() -> None:
85+
with Image.open("Tests/images/rgba16.tga") as im:
86+
assert im.mode == "RGBA"
87+
88+
assert im.getpixel((0, 0)) == (172, 0, 255, 255)
89+
assert im.getpixel((1, 0)) == (0, 255, 82, 0)
90+
91+
8492
def test_id_field() -> None:
8593
# tga file with id field
8694
test_file = "Tests/images/tga_id_field.tga"

0 commit comments

Comments
 (0)