Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing the OpenJPEG sgnd parameter when JPEG2000 encoding #5502

Closed
scaramallion opened this issue May 17, 2021 · 1 comment · Fixed by #6709
Closed

Exposing the OpenJPEG sgnd parameter when JPEG2000 encoding #5502

scaramallion opened this issue May 17, 2021 · 1 comment · Fixed by #6709

Comments

@scaramallion
Copy link
Contributor

scaramallion commented May 17, 2021

I'd like to be able to perform JPEG2K encoding of medical images using Pillow, particularly 16-bit signed greyscale (commonly used with CT and MR). Because of the limited supported modes in Jpeg2KEncode.c this is not currently possible as all input data is treated as unsigned.

Would it be acceptable if I provided a PR exposing the sgnd compression parameter to end users when saving? I ask because it feels more like a workaround than a true solution. Ideally I'd add support for I mode but OpenJPEG only supports a maximum of 31 bit samples.

@radarhere
Copy link
Member

radarhere commented Nov 1, 2022

I've created PR #6709 to resolve this by exposing the sgnd parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants