mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-25 00:34:14 +03:00
Support converting between I;16N and L
This commit is contained in:
parent
2755e0ffaa
commit
700a8e98da
|
@ -90,10 +90,7 @@ def test_convert():
|
|||
|
||||
im = original.copy()
|
||||
|
||||
verify(im.convert("I;16"))
|
||||
verify(im.convert("I;16").convert("L"))
|
||||
verify(im.convert("I;16").convert("I"))
|
||||
|
||||
verify(im.convert("I;16B"))
|
||||
verify(im.convert("I;16B").convert("L"))
|
||||
verify(im.convert("I;16B").convert("I"))
|
||||
for mode in ("I;16", "I;16B", "I;16N"):
|
||||
verify(im.convert(mode))
|
||||
verify(im.convert(mode).convert("L"))
|
||||
verify(im.convert(mode).convert("I"))
|
||||
|
|
|
@ -970,6 +970,13 @@ static struct {
|
|||
{"I;16L", "L", I16L_L},
|
||||
{"L", "I;16B", L_I16B},
|
||||
{"I;16B", "L", I16B_L},
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
{"L", "I;16N", L_I16B},
|
||||
{"I;16N", "L", I16B_L},
|
||||
#else
|
||||
{"L", "I;16N", L_I16L},
|
||||
{"I;16N", "L", I16L_L},
|
||||
#endif
|
||||
|
||||
{"I;16", "F", I16L_F},
|
||||
{"I;16L", "F", I16L_F},
|
||||
|
|
Loading…
Reference in New Issue
Block a user