Skip to content

Commit e908e10

Browse files
committed
Support packing I;16N
1 parent 700a8e9 commit e908e10

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Tests/test_lib_pack.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ def test_I(self):
207207
0x01000083,
208208
)
209209

210+
def test_I16(self):
211+
self.assert_pack("I;16N", "I;16N", 2, 0x0201, 0x0403, 0x0605)
212+
210213
def test_F_float(self):
211214
self.assert_pack("F", "F;32F", 4, 1.539989614439558e-36, 4.063216068939723e-34)
212215

src/libImaging/Pack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ static struct {
664664
#endif
665665
{"I;16B", "I;16B", 16, copy2},
666666
{"I;16L", "I;16L", 16, copy2},
667+
{"I;16N", "I;16N", 16, copy2},
667668
{"I;16", "I;16N", 16, packI16N_I16}, // LibTiff native->image endian.
668669
{"I;16L", "I;16N", 16, packI16N_I16},
669670
{"I;16B", "I;16N", 16, packI16N_I16B},

0 commit comments

Comments
 (0)