Portable Network Graphics
Enable an AI agent to recognise a Portable Network Graphics artifact, assess its interpretability and integrity, and choose transformations that preserve the image properties required by its intended use.
Research draft, second pass
A second pass drafted this model: the structure a model of this thing needs, and what is known about it in the world. The line under this one says how the second half was obtained - researched against sources, or recalled without web access, in which case nothing here was read anywhere and every claim is a lead to verify. Unreviewed either way.
Researched by: Codex + Grok
Purpose and description
Enable an AI agent to recognise a Portable Network Graphics artifact, assess its interpretability and integrity, and choose transformations that preserve the image properties required by its intended use.
Portable Network Graphics (PNG) is a lossless raster image file format specified by ISO/IEC 15948 and W3C Recommendation, using DEFLATE compression and an extensible chunk structure to store paletted, grayscale, or truecolor samples with optional alpha.
It can be Identify and validate a candidate PNG while retaining precise failure evidence.; Decode or preview the image under recorded colour, transparency and resource assumptions.; Inspect animation frames, playback controls and the static fallback.; Recompress or reorganise eligible chunks against explicit preservation requirements.; Resize, recolour, flatten transparency or convert formats while recording intended losses.; Inspect, retain or remove embedded metadata according to the artifact's intended use..
Distinguishing features
Check for the eight-byte signature 89 50 4E 47 0D 0A 1A 0A and a parseable PNG chunk stream; a filename extension alone is insufficient. Reference: [W3C PNG specification](https://www.w3.org/TR/png-3/).
Confirm an IHDR-led structure containing IDAT image data and ending with IEND; distinguish PNG from JPEG, GIF and WebP by parsed structure. Reference: [W3C PNG specification](https://www.w3.org/TR/png-3/).
Identify grayscale, truecolour or indexed samples and their transparency representation; transparency alone does not identify PNG. Reference: [W3C PNG specification](https://www.w3.org/TR/png-3/).
Inspect animation-control and frame chunks before declaring the artifact static: PNG can carry frame-based animation. Reference: [W3C PNG specification](https://www.w3.org/TR/png-3/).
Treat PNG's lossless compression as a property of its encoded samples, not proof that earlier image creation or conversion preserved an original. Reference: [W3C PNG specification](https://www.w3.org/TR/png-3/).
Scope
+ PNG datastream identity, chunk inventory and structural validity
+ Raster dimensions, sample representation, palette and transparency
+ Colour interpretation and embedded image metadata
+ Static-image or animated-PNG behaviour and fallback rendering
+ Decoder compatibility, resource requirements and preservation-aware transformations
- The depicted subject, its meaning and domain-specific interpretation
- General file storage, transport, access permissions and backup management
- Image copyright, licensing and ownership adjudication
- Internal implementation and maintenance of image-processing software
- Vector artwork, layered editing projects and other image-format specifications
Characteristics
- PNG recognition state
- uninspected | signature-match | structurally-recognised | conflicting-evidence | rejected Separates a tentative identification from evidence sufficient to select a PNG parser.
- Canvas dimensions
- width and height in pixels Determines suitability for the intended placement and contributes to decoding resource estimates.
- Sample representation
- recorded IHDR colour type and bit depth, with combination-validity assessment Constrains decoding, palette interpretation and conversions that can preserve sample precision.
- Transparency representation
- none | transparent-sample value | palette alpha | per-pixel alpha | invalid | unknown Determines compositing requirements and what flattening or palette conversion would change.
- Colour interpretation evidence
- absent | present-unassessed | coherent | conflicting | unsupported; retain relevant chunk evidence Prevents an agent from treating assumed colour interpretation as an embedded declaration.
- Chunk validation state
- unchecked | passed | failed | incomplete, with chunk offsets and diagnostics Supports decisions to accept, investigate or reject the artifact without confusing readability with conformance.
- Animation interpretation
- static | valid-animation | malformed-animation | unresolved Determines whether frame timing, compositing and playback must be preserved.
- Animation extent
- declared and decoded frame counts; frame delays in seconds; finite or unbounded playback Supports playback verification, preview selection and resource budgeting.
- Decode resource estimate
- estimated peak bytes and processed pixels, with decoder assumptions Allows inspection to be bounded before allocating image or animation buffers.
- Target decoder compatibility
- decoder and version linked to tested PNG features and observed outcomes Makes compatibility claims specific to the software that will actually consume the artifact.
- Required preservation level
- byte identity | decoded samples | colour-managed appearance | animation behaviour | task-defined combination Defines the evidence needed before accepting an optimisation or conversion.
Where this came from
wikidata · CC0 1.0
Drafted structure
Bundle to layer to finding to question, as the second pass will find it: 6 bundles · 11 layers · 18 findings · 33 questions.
Datastream recognition and conformance Evidence that the candidate is PNG and that its encoded structure is acceptable.
An agent needs to distinguish identification, structural validity and decoder tolerance before operating on the image.
Signature and chunk layout
Observable framing of the candidate PNG stream.
PNG identity evidence
Record signature results, chunk boundaries and discrepancies with declared file type.
- Do the bytes support PNG identification, and where does the candidate datastream begin and end? definition
- Are chunk lengths, required chunks and ordering valid under the selected PNG specification? boundary
Validation and extension handling
Assessment of corruption, unsupported features and chunk interpretation.
Chunk and decode diagnostics
Keep chunk-check results separate from successful decoding and record the treatment of unfamiliar chunks.
- Which CRC, ordering or image-data checks passed, failed or remained unperformed? measurement
- Which unknown chunks require rejection, permit ignoring or constrain copying after an edit? action
- Which validator, version and specification baseline produced this assessment? provenance
Raster samples and transparency The canvas and encoded samples that determine image reconstruction.
PNG transformations depend on precision, palette interpretation and transparency rather than dimensions alone.
Canvas and sample layout
Dimensions, colour type, bit depth and palette interpretation.
Encoded raster representation
Record the declared sample layout and whether decoded data agrees with it.
- What are the canvas dimensions, colour type, bit depth and interlace method? measurement
- Is the representation valid, including any required palette and decoded palette-index bounds? boundary
Alpha and background compositing
Transparency evidence and the assumptions used when displaying or flattening it.
Transparency preservation
Record encoded transparency separately from the background chosen by a renderer or transformation.
- How is transparency represented, and does decoding reveal opaque, transparent or partially transparent pixels? measurement
- What background and compositing interpretation are required before flattening transparency? action
- Must colour samples beneath fully transparent pixels survive the proposed operation? boundary
Colour and embedded context Embedded information that affects appearance or contextual interpretation.
Preserving pixel values alone may not preserve appearance or the contextual information required by downstream use.
Colour interpretation
Declared colour information, conflicts and renderer assumptions.
Colour evidence and rendering policy
Record relevant colour chunks and the interpretation selected for the intended renderer.
- Which profile, transfer-function, chromaticity or HDR-related declarations are present and readable? measurement
- How does the selected specification resolve overlapping declarations, and what assumptions fill missing information? boundary
- Which declarations does the target renderer actually honour? measurement
Metadata meaning and retention
Embedded contextual information and its relevance to an operation.
Embedded context inventory
Inventory textual, physical-dimension, Exif and other contextual chunks without treating their contents as verified facts.
- What contextual metadata is present, and which statements have independent provenance evidence? provenance
- Which metadata must be retained, updated or removed for the intended transformation and destination? action
Animation and static fallback Optional animated-PNG structure, playback and default-image behaviour.
A still preview can conceal frame content or timing that an agent must preserve or deliberately discard.
Frame structure and fallback
Animation identification, frame organisation and default-image relationship.
Animation structure assessment
Record declared animation controls, decoded frames and the image available to a static-only consumer.
- Do animation-control and frame chunks form a valid sequence with consistent frame counts and canvas bounds? boundary
- What default image appears without animation support, and does it participate in the animation? definition
Timing and frame compositing
Playback timing, repetition and reconstruction of displayed frames.
Playback preservation contract
Record frame delays, blend and disposal controls, loop intent and observed playback.
- What delays, repeat count, frame rectangles, blend operations and disposal operations govern playback? measurement
- Which displayed frame, timestamp or default image should a requested still-image extraction represent? action
- Does the target player reproduce the required timing and compositing behaviour? measurement
Bounded processing and transformation Conditions for decoding, editing and delivering the PNG successfully.
An agent must connect PNG properties to resource limits and explicit preservation outcomes before selecting an operation.
Decode feasibility
Resource estimates and compatibility with the intended processing environment.
Bounded decode plan
Assess the work implied by dimensions, samples, compressed ancillary data and optional animation.
- What memory and processing estimates follow from the canvas, sample layout, frame sequence and metadata payloads? measurement
- Which limits and decoder capabilities determine whether inspection can proceed, stop early or require another tool? action
Edit permission and result equivalence
The intended change and evidence that its required image properties survive.
PNG transformation contract
Specify allowed changes and compare the result at the preservation level required by the task.
- Must this operation preserve original bytes, decoded samples, rendered appearance, metadata or animation behaviour? boundary
- Which recompression, palette, precision, resizing or format-conversion changes are authorised by that requirement? action
- What validation and before-and-after comparison demonstrate that the output satisfies the contract? measurement
Evidence and external alignment What the world already says about this thing, gathered so the model can be checked against it.
A model that cannot be lined up against existing standards, identifiers and practice cannot be adopted by anyone who already uses them.
Reported evidence
Findings from the breadth pass, kept separate from the structural claims.
Kinds and varieties
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- PNG-8 (indexed-color, up to 256 palette entries, optional tRNS transparency)
- PNG-24 (truecolor RGB, 8 bits per sample, no alpha)
- PNG-32 (truecolor RGB plus alpha, 8 bits per sample)
- PNG-48 / PNG-64 (16-bit-per-sample truecolor, without or with alpha)
- Grayscale PNG (1-16 bits per sample, optional alpha or tRNS)
- Animated PNG (APNG, unofficial Mozilla/Apple extension with acTL/fcTL/fdAT chunks)
- Interlaced PNG (Adam7 pass order)
- PNG with ancillary metadata (gAMA, cHRM, iCCP, sRGB, eXIf, pHYs, tEXt/iTXt/zTXt)
- Which of these kinds and varieties hold for the sense of Portable Network Graphics this model covers, and on what evidence? provenance
Identifiers and schemes
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Wikidata - Q178051 - Item for the PNG file format.
- ISO/IEC - ISO/IEC 15948:2004 - International Standard for PNG functional specification.
- IANA media type - image/png - Registered MIME type.
- Filename extension - .png - Conventional extension; case-insensitive on most platforms.
- Magic number - 89 50 4E 47 0D 0A 1A 0A - 8-byte PNG signature at start of file.
- PRONOM - fmt/11, fmt/12, fmt/13, fmt/935 - The National Archives UK format identifiers for PNG 1.0, 1.1, 1.2, and Extended PNG.
- UTI - public.png - Apple Uniform Type Identifier.
- Which of these identifiers and schemes hold for the sense of Portable Network Graphics this model covers, and on what evidence? provenance
Standards and regulation
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- ISO/IEC 15948:2004 - ISO/IEC JTC 1/SC 24 (functional specification of PNG)
- W3C Recommendation: Portable Network Graphics (PNG) Specification (Third Edition), 2025 - World Wide Web Consortium
- RFC 2083 (informational) - IETF (PNG 1.0, 1997)
- W3C Recommendation PNG Specification (Second Edition), 2003 - aligned with ISO/IEC 15948:2003
- IANA media type registration image/png - Internet Assigned Numbers Authority
- APNG is not in ISO/IEC 15948; it is a de-facto extension (Mozilla, later Apple) using private/unofficial chunks
- Which of these standards and regulation hold for the sense of Portable Network Graphics this model covers, and on what evidence? provenance
Real-world use
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Web and UI graphics where lossless fidelity and alpha transparency are required (icons, diagrams, screenshots, overlays).
- Digital preservation and scientific imaging when lossy JPEG artefacts are unacceptable.
- Game and app asset pipelines for sprites and UI with alpha; often converted to GPU-native formats at runtime.
- Screenshot and document export default on many operating systems (Windows Snipping Tool, macOS, browsers).
- Print and prepress less common than TIFF/PDF; PNG is used for web-to-print proofs and some desktop publishing.
- APNG used for short lossless animations (stickers, UI loaders) as a GIF replacement where supported.
- Which of these real-world use hold for the sense of Portable Network Graphics this model covers, and on what evidence? provenance
Typical measurements
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Bit depth per sample - 1, 2, 4, 8, or 16 - bits
- Colour type - 0 grayscale, 2 RGB, 3 indexed, 4 grayscale+alpha, 6 RGBA - enum (IHDR colour type)
- Image dimensions - 1-1 000 000+ pixels per axis in the spec; practical web assets often 16-4096 px - pixels
- File size (web icon / UI) - about 1-500 - KiB
- File size (screenshot / photo-like lossless) - about 0.2-50 - MiB
- Compression method - 0 only (DEFLATE/zlib, as of PNG 1.2 / ISO 15948) - IHDR compression method code
- Gamma (gAMA) - typically 45455 representing 1/2.2, or omitted in favour of sRGB/iCCP - stored as gamma × 100000
- Which of these typical measurements hold for the sense of Portable Network Graphics this model covers, and on what evidence? provenance
Failure modes and hazards
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Decompression bombs: tiny compressed files expand to huge bitmaps and exhaust memory (historical browser/libpng CVEs).
- Chunk-length and CRC errors: truncated or corrupted files fail to decode; some decoders abort, others skip ancillary chunks.
- Incorrect colour management: ignoring gAMA/cHRM/iCCP/sRGB yields washed-out or oversaturated display versus sRGB-assuming viewers.
- tRNS vs full alpha mismatch: indexed/grayscale transparency handled differently across editors, causing unexpected opaque regions.
- APNG treated as still PNG by decoders that ignore acTL/fcTL/fdAT, showing only the default image.
- CgBI (iOS Xcode) and other private chunks produce files that are not ISO PNG and fail in standard decoders.
- No native CMYK or 32-bit float HDR in the core format; converting from those spaces loses or mis-maps colour.
- Lossless but inefficient for photographic content versus JPEG/WebP/AVIF; large files strain bandwidth and caches.
- Security: historically, libpng integer overflows and overruns in ancillary chunk parsers (eXIf, iCCP, tEXt).
- Which of these failure modes and hazards hold for the sense of Portable Network Graphics this model covers, and on what evidence? provenance
Regional variation
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Filename extension is universally .png; no significant regional naming split.
- Some East Asian software historically labelled 8-bit indexed PNG as "PNG-8" following Adobe/Macromedia web-export jargon rather than the ISO colour-type numbers.
- Apple platforms historically emitted CgBI-optimized PNG from Xcode that is not portable ISO PNG; Android and web stacks expect standard PNG.
- Animated PNG support is uneven: Firefox, Chrome, Safari support APNG; some professional imaging tools still treat PNG as still-only.
- PRONOM and national archives distinguish PNG 1.0/1.1/1.2 versions that web developers rarely name.
- Which of these regional variation hold for the sense of Portable Network Graphics this model covers, and on what evidence? provenance
Neighbouring kinds and how to tell them apart
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- GIF - GIF is indexed-color (≤256 colours) with optional animation and a patent-era LZW history; PNG is lossless for 24/32-bit colour and alpha. Animation in PNG is APNG, not GIF's graphic-control extensions. Test: 8-byte signature 89 50 4E 47… versus GIF87a/GIF89a.
- JPEG / JFIF - JPEG is typically lossy DCT for photographs and has no native alpha; PNG is lossless DEFLATE. Test: JPEG SOI FF D8 vs PNG signature; also JPEG artefacts vs exact pixel reconstruction.
- WebP (lossless and lossy) - WebP can be lossy or lossless and supports animation and alpha; container is RIFF. Test: RIFF….WEBP versus PNG signature. WebP lossless often smaller than PNG for photos; PNG remains the interchange default.
- AVIF - AVIF is HEIF/AV1, usually lossy with optional lossless, HDR-capable; PNG is a simple chunked bitmap. Test: ftyp/avif brands versus PNG signature.
- TIFF - TIFF is a tagged container with many compressions (including uncompressed, LZW, JPEG) and CMYK/multi-page; PNG is a single-image web/interchange format with a fixed DEFLATE method. Test: II*/MM* TIFF header versus PNG signature.
- MNG / JNG - MNG was the official PNG-group animation/multiple-image format and JNG a JPEG-in-PNG-wrapper; both failed to gain web adoption. APNG is a PNG-compatible extension. Test: MNG signature 8A 4D 4E 47… versus PNG 89 50 4E 47….
- BMP / Windows bitmap - BMP is typically uncompressed raster with optional alpha in later DIB variants; PNG is compressed and portable. Test: BM magic versus PNG signature.
- Which of these neighbouring kinds and how to tell them apart hold for the sense of Portable Network Graphics this model covers, and on what evidence? provenance
Sources
- ISO/IEC 15948:2004 Information technology - Computer graphics and image processing - Portable Network Graphics (PNG): Functional specification - Normative identity of PNG as an ISO/IEC International Standard; functional specification of the file format.
- Portable Network Graphics (PNG) Specification (Third Edition) - Current W3C Recommendation covering chunks, colour types, interlacing, compression, and colour management.
- RFC 2083: PNG (Portable Network Graphics) Specification Version 1.0 - Original IETF publication of PNG 1.0; historical source of the format definition.
- Portable Network Graphics (Q178051) - Stable identifier and aliases used in public catalogues.
What the second pass must settle
- Does the existing Vercy catalogue already contain an authoritative PNG or image-format model that this registry entry should reference or specialise?
- Should this registry entry represent PNG as a format-level concept, individual PNG artifacts, or a format model with an explicit artifact-assessment component?
- Which PNG specification edition and extension set should define the publication's conformance baseline?
- Which target decoders must be tested for animation, colour declarations, HDR interpretation and malformed-input handling?
- What task-specific resource limits and equivalence criteria should govern optimisation, metadata removal and conversion?