Skip to content

Commit

Permalink
Fixed I;16 conversion on big endian
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 21, 2021
1 parent 591e79e commit 55e2569
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Tests/test_file_png.py
Expand Up @@ -13,7 +13,6 @@
assert_image_equal,
assert_image_equal_tofile,
hopper,
is_big_endian,
is_win32,
mark_if_feature_version,
skip_unless_feature,
Expand Down Expand Up @@ -77,7 +76,6 @@ def get_chunks(self, filename):
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
Expand Down
7 changes: 7 additions & 0 deletions src/libImaging/Convert.c
Expand Up @@ -963,10 +963,17 @@ static struct {

{"HSV", "RGB", hsv2rgb},

#ifdef WORDS_BIGENDIAN
{"I", "I;16", I_I16B},
{"I;16", "I", I16B_I},
{"L", "I;16", L_I16B},
{"I;16", "L", I16B_L},
#else
{"I", "I;16", I_I16L},
{"I;16", "I", I16L_I},
{"L", "I;16", L_I16L},
{"I;16", "L", I16L_L},
#endif

{"I", "I;16L", I_I16L},
{"I;16L", "I", I16L_I},
Expand Down

0 comments on commit 55e2569

Please sign in to comment.