Fixed unpacking I;16B to I;16 on big endian

This commit is contained in:
Andrew Murray 2021-12-28 17:38:01 +11:00
parent 4b7b07de70
commit aeb549ef8f
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,6 @@ from .helper import (
assert_image_equal,
assert_image_equal_tofile,
hopper,
is_big_endian,
is_win32,
mark_if_feature_version,
skip_unless_feature,
@ -77,7 +76,6 @@ class TestFilePng:
png.crc(cid, s)
return chunks
@pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_sanity(self, tmp_path):
# internal version number

View File

@ -656,7 +656,11 @@ static struct {
/* storage modes */
{"I;16", "I;16", 16, copy2},
#ifdef WORDS_BIGENDIAN
{"I;16", "I;16B", 16, packI16N_I16},
#else
{"I;16", "I;16B", 16, packI16N_I16B},
#endif
{"I;16B", "I;16B", 16, copy2},
{"I;16L", "I;16L", 16, copy2},
{"I;16", "I;16N", 16, packI16N_I16}, // LibTiff native->image endian.