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

NPE while read a PSD file #843

Closed
jack-131 opened this issue Oct 20, 2023 · 3 comments
Closed

NPE while read a PSD file #843

jack-131 opened this issue Oct 20, 2023 · 3 comments

Comments

@jack-131
Copy link

jack-131 commented Oct 20, 2023

Describe the bug
when i read a PSD file use this code
bufferedImage = ImageIO.read(new File(srcFile));
it causes npe.
but not every psd will cause this exception,when i try other file ,it`s ok
Version information
image

Screenshots
image
psd file cause error
https://inner-bucket.s3.us-west-1.amazonaws.com/00001/3WlyxmnA/7be50b03-7c5a-4e5e-9ecc-b68b327b3598.psd

@haraldk
Copy link
Owner

haraldk commented Oct 20, 2023

Thanks for reporting!

It seems we have incorrectly handled empty image resources section of PSDs, causing problems later when we search for the embedded color space. Do you happen to have a smaller sample file with this problem, that I can use in tests?

Anyway, fixed, hopefully released soon!

PS: For the future, please include version information and stack traces as text. 😀

@haraldk haraldk closed this as completed Oct 20, 2023
@jack-131
Copy link
Author

@haraldk Thank you for your answer. But now, is there a temporary and right way before next version to read this PSD file? I would greatly appreciate your answer.

@haraldk
Copy link
Owner

haraldk commented Oct 23, 2023

Version 3.10.0 with the fix for this issue was released on Friday.

I don’t think there is a workaround to read it with the previous version.

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

No branches or pull requests

2 participants