page_title: Portable Network Graphics
section_title: Compression
hierarchical_section_title: Portable Network Graphics / File format / Compression
caption_attribution_description: ≤1, ≤2, ≤3, ≤4, ≤5, ≤6, ≤7, ≤8, ≤9, ≤10, ≤11, ≤12, ≤13, ≤14, ≤15, ≤16, ≥16 bit/px English: A pseudo-thermal view of the bit usage of each pixel in the PNG file File:PNG demo Banana.png. Colours from blue to yellow indicate more or less compression gain, orange pixels need up to the same amount of data as the uncompressed data, and red tones indicate negative compression gain for a pixel. The image shows the comparatively good compressibility of flat areas and gradients, bad compression on edges, and good compressibility for some areas that contain a recurring pattern, although not all of these areas are recognised. The efficient encoding of more uniform areas shows the effect of the prefilters which can decorrelate gradients and enable describing pixels through the difference to surrounding pixels. The incomplete recognition of recurring patterns is limited by the 32 kBit size of the Deflate search window. Created using version 0.2a of the program pngthermal. Deutsch: Eine Choroplethenansicht der Bildfläche der PNG-Datei File:PNG demo Banana.png, die den Kodierungsaufwand in Bits für jeden Bildpunkt darstellt. Farben von blau bis gelb bedeuten mehr oder weniger Kompressionsgewinn, orangefarbene Bildpunkte sind (fast) genauso datenaufwändig kodiert wie die unkomprimierten Daten und Rottöne bedeuten negativen Kompressionsgewinn. Das Bild zeigt die uniformitätsabhängige Kompressimierbarkeit mit bester Kompression bei einfarbigen Bereichen und Farbverläufen, vergleichsweise schlechter Kompression an Kanten und gute Komprimierbarkeit bei einigen Bereichen, die ein wiederkehrendes Muster enthalten, wobei diese Bereiche nicht vollständig erkannt wurden. Die effiziente Kodierung uniformerer Bereiche zeigt die Leistung der Vorfilter, die Farbverläufe dekorrelieren und eine Beschreibung als Differenz zu benachbarten Bildpunkten ermöglichen. Die unvollständige Erkennung der wiederkehrenden Muster ist durch die Größe des Deflate-Suchfensters von 32 kBit beschränkt. Erzeugt mit Version 0.2a des Programmes pngthermal.
context_page_description: Portable Network Graphics is a raster-graphics file format that supports lossless data compression. PNG was developed as an improved, non-patented replacement for Graphics Interchange Format.
  PNG supports palette-based images, grayscale images, and full-color non-palette-based RGB or RGBA images. The PNG working group designed the format for transferring images on the Internet, not for professional-quality print graphics; therefore non-RGB color spaces such as CMYK are not supported. A PNG file contains a single image in an extensible structure of chunks, encoding the basic pixels and other information such as textual comments and integrity checks documented in RFC 2083.
  PNG files use the file extension PNG or png and are assigned MIME media type image/png.
  PNG was published as informational RFC 2083 in March 1997 and as an ISO/IEC 15948 standard in 2004.
context_section_description: PNG uses a 2-stage compression process:
  pre-compression: filtering (prediction)
  compression: DEFLATE
  PNG uses DEFLATE, a non-patented lossless data compression algorithm involving a combination of LZ77 and Huffman coding. Permissively-licensed DEFLATE implementations, such as zlib, are widely available.
  Compared to formats with lossy compression such as JPG, choosing a compression setting higher than average delays processing, but often does not result in a significantly smaller file size.
caption: Representation of bit cost per pixel for above PNG file (red=expensive, blue=cheap)
exif: {}