Glossary
PNG text chunk
A PNG text chunk is a named section of a PNG file holding arbitrary text metadata, optionally compressed.
Updated
Also written: tEXt, iTXt, zTXt.
PNG is a chain of length-prefixed, CRC-checked chunks. Text goes in tEXt (plain), zTXt (compressed) or iTXt (international, optionally compressed), each keyed by a short label.
This is where AI image tools leave the most. Stable Diffusion front-ends write the complete prompt, negative prompt, seed, sampler, CFG scale, model name and hash into a tEXt chunk conventionally labelled "parameters" — readable in a plain text editor, and invisible in every operating system file-properties panel.
Because each chunk is self-describing and CRC-checked, metadata chunks can be filtered out and the survivors copied through byte for byte. Nothing needs recomputing and the pixel stream is untouched.
Not all ancillary chunks are metadata: gAMA, cHRM and sRGB describe rendering intent, and the APNG animation chunks make animated PNGs animate. Those are kept.
Related terms
- APP marker segment — An APP marker segment is a labelled block in a JPEG file where applications store metadata, ahead of the compressed image data.
- RIFF chunk — A RIFF chunk is a labelled, length-prefixed block in the container format WebP is built on.
- Chunk — A chunk is a self-describing section of a file, carrying its own type label and length.