Skip to content

Bug in PNG compressed iTXt chunk #421

@reinfallt

Description

@reinfallt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions