Important PNG chunks
IHDR defines dimensions and color type, IDAT stores compressed pixels and IEND closes the stream. Ancillary chunks can add metadata, profiles and animation.
- eXIf: EXIF payload
- tEXt/zTXt/iTXt: textual metadata
- iCCP/sRGB/gAMA/cHRM: color behavior
- acTL/fcTL/fdAT: APNG animation
Safe processing
Validate chunk sizes and CRCs, never inject text metadata as HTML, and keep animation and color chunks unless the user explicitly requests a different transformation.
Read the chunk list before making assumptions
PNG is a sequence of length-prefixed chunks with a type, payload and CRC. Critical chunks such as IHDR and IDAT are required for the image; ancillary chunks can describe text, color, resolution, timestamps or embedded EXIF.
The presence of a text chunk is not automatically a privacy problem. Its key and value matter. A copyright notice and a precise location string should not receive the same risk label.
- eXIf can hold EXIF
- tEXt, zTXt and iTXt can hold text
- iCCP and sRGB describe color
- pHYs describes pixel density
- IDAT carries compressed image data
How the byte-level test worked
The fixture used a valid PNG signature and deterministic chunks. The tEXt payload contained only a synthetic label, so no personal data entered the repository. After cleaning, the output no longer contained the text type or value, while the image structure remained.
This narrow fixture does not cover every PNG extension or animated PNG sequence. A production cleaner still validates chunk lengths, total size and CRC boundaries and rejects malformed containers rather than trusting unbounded offsets.
Color and privacy are separate decisions
An ICC profile or sRGB marker controls color interpretation and normally does not identify a person. Removing it can make an image appear different across applications. Privacy mode should preserve color evidence unless the user deliberately requests a conversion.
After cleaning, confirm transparency, dimensions and color appearance as well as metadata. A result that removes a text field but breaks alpha or shifts color is not a professional output.
What this does not prove
A metadata result describes the fields and structures that the supported parser could read. It does not, by itself, prove authenticity, intent, authorship or the truth of the visible scene.