Skip to content

Incorrect CRC32 Checksum in PNG.png #17

Description

@bliutech

For the following graphic in /binary/PNG.png the CRC32 Checksum is incorrect for the IEND chunk.

PNG

The CRC32 checksum is only calculated on the header type for the IEND chunk due to the chunk length of 0. The following output is the calculated CRC32 checksum (so the graphic just has a small typo of one incorrect hex character).

import zlib
checksum = zlib.crc32(b"IEND")
print("Checksum:", hex(checksum))
> Checksum: 0xae426082

The graphic on the left hand side has the correct checksum.

Additionally, I am also curious if there could be a way to indicate in the graphic that the CRC32 checksum does NOT include the chunk length as shown in this blog post. The current graphic makes it appear that the length is included when calculating the checksum when in reality only the chunk contents and the chunk type are.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions