Skip to content

JPEG2000: 9-bit images use L mode instead of I;16 #7899

@scaramallion

Description

@scaramallion

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions