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

Bug in PNG compressed iTXt chunk #421

Open
reinfallt opened this issue May 5, 2024 · 0 comments · May be fixed by #422
Open

Bug in PNG compressed iTXt chunk #421

reinfallt opened this issue May 5, 2024 · 0 comments · May be fixed by #422

Comments

@reinfallt
Copy link
Contributor

There seems to be a bug in the decoding of compressed iTXt chunks in PNG files. Instead of trying to decompress the actual compressed data stored after the keyword and flags, the data from the start of the whole chunk is sent instead which causes a failure:

if (!TryDeflate(bytes, bytesLeft, out textBytes, out string? errorMessage))

I have fixed the issue in a branch here and will create a PR:
https://github.com/reinfallt/metadata-extractor-dotnet/tree/png_iTXt_compressed

Here is an example png file:
red_itxt

@reinfallt reinfallt linked a pull request May 5, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant