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

Adam7 fails for paletted images #16

Open
ThomasHoevel opened this issue Feb 8, 2024 · 2 comments
Open

Adam7 fails for paletted images #16

ThomasHoevel opened this issue Feb 8, 2024 · 2 comments

Comments

@ThomasHoevel
Copy link

ThomasHoevel commented Feb 8, 2024

logo.zip

When opening the attached image after applying the patch from issue #13 (#13 (comment)), the library fails while reading the image.
The image is interlaced using Adam7.

@ThomasHoevel
Copy link
Author

Update: The image dimensions are 360x180.
Decoder allocates 360x180 bytes for the image.
RawPngData calculates with 361 bytes per row and hits an Index out of range exception.

@ThomasHoevel
Copy link
Author

I updated the code to make it work by conditionally adding "1" add two places for the image with color palette. Our interleaved true-color test image only works without adding 1.
I don't know if this works for all images.
See PR #17.

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

No branches or pull requests

1 participant