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

Incorrect CRC32 Checksum in PNG.png #17

Open
bliutech opened this issue Mar 3, 2024 · 0 comments
Open

Incorrect CRC32 Checksum in PNG.png #17

bliutech opened this issue Mar 3, 2024 · 0 comments

Comments

@bliutech
Copy link

bliutech commented Mar 3, 2024

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.

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