Alexander Lehmann Created 2026-10-13 Updated 2026-11-05
Alexander Lehmann is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Alex Jakulin Created 2026-10-13 Updated 2026-11-05
Alex Jakulin is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Andrew Smith Created 2026-10-13 Updated 2026-11-05
Andrew Smith is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Chris Herborth Created 2026-10-13 Updated 2026-11-05
Chris Herborth is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Christian Brunschen Created 2026-10-13 Updated 2026-11-05
Christian Brunschen is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Dave Martindale Created 2026-10-13 Updated 2026-11-05
Dave Martindale is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
File format 2026-10-13
A file format specifies how a binary string is interpreted: field order, field widths, permitted values and where decoding stops. A data compression comparison must include all fields required to recover the data.
Guy Schalnat Created 2026-10-13 Updated 2026-11-05
Guy Schalnat is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Image compression 2026-10-13
Image compression applies data compression to pictures, usually represented by raster images. Nearby pixels often have related shades; an encoder can exploit that structure. A flat region invites run-length encoding, while lossy block averaging trades fine detail for fewer stored samples. The choice depends on whether exact pixel values matter and on the patterns in the image.
Lossless source coding recovers the encoded pixel values exactly, including sharp text or numerical image data. Lossy compression preserves an approximation and can remove features that later image processing might need. A visually smooth result is therefore a different promise from exact recovery. Neither method has a universal compression ratio: the chosen file format, its file header and the particular image all matter.
PNG is a real format with lossless source coding of its encoded image data. Its specified compression uses Deflate on reversibly filtered rows, rather than our toy RLE format. The lossy block averaging example is also a teaching format, not a description of PNG. A lossy preprocessing step followed by saving as PNG preserves the already changed pixels, not the earlier original.[ref]
Portable Network Graphics (PNG) Specification (Third Edition) by Mark Adler and others. W3C, PNG Specification, Third Edition (2025), section 10, Compression
Jeremy Wohl Created 2026-10-13 Updated 2026-11-05
Jeremy Wohl is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Keith S. Pickens Created 2026-10-13 Updated 2026-11-05
Keith S. Pickens is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Lossy block averaging 2026-10-13
This toy image compression method stores one rounded arithmetic mean for each disjoint block of grayscale pixels. The quantization rule is round to the nearest integer, with exact halves rounded upward. Each stored value is an unsigned eight-bit integer. Reconstruction fills the original block with that value, a form of nearest-neighbor interpolation. Averaging already discards information; rounding can discard more.
Here is an exact source array. Index rows and columns by and defineThe floor function makes constant within each block; the indicator function adds 1 only to its upper-left pixel. All values are integers from 20 to 215. Each block therefore has the exact formFor example, the upper-left block has arithmetic mean and is stored as 40. The block immediately to its right is stored as 52. The complete stored array is specified by for . Its first row is ; its last is .
This toy file format again has eight-bit width and height fields followed by a one-bit mode: 0 means raw eight-bit grayscale pixels, 1 means the rounded block arithmetic means. This profile accepts only width and height 16. The decoder knows the block size and reconstruction rule from the format, reads the 64 stored values in row order, and repeats each across its corresponding block. The original 256 pixels cost payload bits; the 64 stored values cost payload bits. The reduction is . These payload counts exclude the common 17-bit file header; complete sizes are 2065 and 529 bits, or 2072 and 536 bits after final zero padding to eight-bit units. There is no stored codebook or additional prediction rule.
The empirical mean squared error averages squared differences over the 256 original pixel positions:Every block has the same four errors, so this value is exact in squared stored shade units. If the unrounded arithmetic mean could be reconstructed, the error would instead be ; eight-bit quantization adds . That hypothetical comparison does not count fractional means as free eight-bit values.
The broad shade pattern survives, while the alternating bright and dark pixels vanish. Indeed, a second source with every block constant at produces the identical stored array : exact decoding of both sources is impossible. This makes the storage benefit and the lost detail visible at once. Block averaging is useful for a coarse preview when the individual pixels are dispensable; choosing an acceptable mean squared error or visual result is part of the application, not a guarantee supplied by the encoder.
Michael Stokes Created 2026-10-13 Updated 2026-11-05
Michael Stokes is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Neal Kettler Created 2026-10-13 Updated 2026-11-05
Neal Kettler is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Oliver Fromme Created 2026-10-13 Updated 2026-11-05
Oliver Fromme is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Owen Mortensen Created 2026-10-13 Updated 2026-11-05
Owen Mortensen is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Paul Schmidt Created 2026-10-13 Updated 2026-11-05
Paul Schmidt is credited as an author of the PNG specification, the shared technical description of a file format for raster images using lossless source coding.[ref]
Phil Harvey Created 2026-10-13 Updated 2026-11-05
Phil Harvey is credited as an author of the PNG specification. The author list establishes his contribution to the shared raster image file format specification, whose metadata and data compression conventions permit independently developed tools to exchange images.[ref]
PNG 2026-10-13
PNG is a file format for raster images with lossless source coding of the encoded image data. Its first W3C Recommendation, dated 1 October 1996, described a portable replacement for earlier image formats; this situates the design in exchanging images reliably between systems.[ref]
https://www.w3.org/TR/REC-png-961001. W3C, PNG (Portable Network Graphics) Specification, 1 October 1996, status and abstract
Raster graphics Created 2026-10-13 Updated 2026-10-20
Raster graphics describe a picture by an array of pixels on a grid. For a rectangular image of width and height , write its stored values as , with and . A grayscale pixel can have one shade value; a colour pixel can have several component values. The grid specifies where values belong, while the encoding specifies what those values mean. A raster image therefore needs dimensions and an interpretation of its samples, not just a string of numbers.
The appealing feature is that pictures become explicit data: selecting a rectangle selects entries of an array; comparing two images compares their pixel values; image compression can exploit repeated or related values. Raster sampling and reconstruction explains why the stored grid and the displayed picture are different objects. A square drawn around a sample is one display convention, not a claim that the original scene consisted of little squares.
For example, a grayscale raster image stores 24 pixel values, even when displayed across a much larger rectangle. With one unsigned eight-bit sample per pixel, its uncompressed sample payload is bits; a file format can additionally require a file header, padding and other information, and image compression can change the stored size.
Enlarging that image can copy each pixel into a block through nearest-neighbor interpolation, or infer intermediate values through interpolation. Either procedure supplies a reconstruction rule; neither determines which unrecorded detail was present in the original. Vector graphics use a different representation, specifying geometric objects to be rendered onto a chosen grid. Re-rendering such a description and enlarging an existing raster image are different operations.
