JPEG2000: 9-bit images use L mode instead of I;16
scaramallion opened this issue · comments
What did you do?
9-bit precision JPEG 2000 codestream with a .txt extension: 9bit.txt (rename to 9bit.j2k)
with Image.open("9bit.j2k") as im:
assert im.mode == "I;16"
assert im.size == (128, 128)
What did you expect to happen?
No exceptions
What actually happened?
AssertionError: assert 'L' == 'I;16'
What are your OS, Python and Pillow versions?
- OS: Ubuntu 22.04
- Python: 3.12
- Pillow: Current
main
19cd94b