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

Basic support for CMYK JPEG images #10149

Closed
rymsha opened this issue May 26, 2023 · 2 comments · Fixed by #10150
Closed

Basic support for CMYK JPEG images #10149

rymsha opened this issue May 26, 2023 · 2 comments · Fixed by #10150
Assignees
Labels
Milestone

Comments

@rymsha
Copy link
Contributor

rymsha commented May 26, 2023

Cannot invoke "javax.imageio.ImageTypeSpecifier.getColorModel()" because the return value of "javax.imageio.ImageReader.getRawImageType(int)" is null

It is reported as fixed in JDK https://bugs.openjdk.org/browse/JDK-8143562, but actually some images still fail.

@rymsha rymsha added the Bug label May 26, 2023
@rymsha rymsha added this to the 7.13.0 milestone May 26, 2023
@rymsha rymsha self-assigned this May 26, 2023
rymsha added a commit that referenced this issue May 26, 2023
@rymsha rymsha linked a pull request May 26, 2023 that will close this issue
@rymsha
Copy link
Contributor Author

rymsha commented May 26, 2023

Problem arises when Java program is trying to use the getColorModel() method on a null object returned by getRawImageType(int). This happens image format that ImageIO does not fully support.

Checking for null and falling back some assumed values before calculating required memory size fixes the problem.

@rymsha
Copy link
Contributor Author

rymsha commented Jun 3, 2023

Some (basic) CMYK JPEG support was added recently https://bugs.openjdk.org/browse/JDK-8274735
But support is still not complete https://bugs.openjdk.org/browse/JDK-5100094

@alansemenov alansemenov changed the title CMYK JPEG images fail to render Support CMYK JPEG images Jun 13, 2023
@alansemenov alansemenov changed the title Support CMYK JPEG images Basic support for CMYK JPEG images Jun 13, 2023
@alansemenov alansemenov added Feature and removed Bug labels Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants