
PNG chunks
Walk a PNG's chunk structure, type, length, offset, CRC validity, and decode IHDR and any text chunks.
PNG chunks lists every chunk after the signature by type, length and offset, checking whether its stored CRC matches a freshly recomputed one. IHDR gets fully decoded, width, height, bit depth and colour type among the fields, and any tEXt, zTXt or iTXt text gets pulled out, inflating compressed ones. A missing valid chunk, or missing IHDR or IEND, is flagged malformed.
Questions
What does each chunk row show?
Its 4-character type, declared length, byte offset, and whether its stored CRC matches a freshly computed one.
What does it decode from IHDR?
Width, height, bit depth, color type, compression method, filter method and interlace method.
What text chunks does it read?
tEXt directly, and zTXt and iTXt after inflating them from zlib when they are marked compressed.
What if the signature is present but no valid chunk follows?
The tool refuses, naming the file as having a signature but no valid chunk.
What if IHDR or IEND is missing?
A missing IHDR is flagged as a malformed PNG; a missing IEND is flagged as possibly truncated.
Compare
| Tool | Runs on the CLI | Live as you type |
|---|---|---|
| PNG chunks | Yes | No |
| Parse ASN.1 | Yes | No |
| Parse Object Identifier | Yes | No |
| TLV / Tag-Length-Value parser | Yes | No |
| ELF info | Yes | No |
| JPEG structure | Yes | No |
| ZIP structure | Yes | No |