ArticleslgStudy

computer science

PNG

PNG is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand PNG rather than just read about it. In short: Portable Network Graphics (PNG, officially pronounced PING, colloquially pronounced PEE-en-JEE) is a raster-graphics file format that supports lossless data compression. PNG was developed as an improved, non-patented replacement for Graphics Interchange Format (GIF).

PNG — main illustration
PNG — illustration

Key takeaways

  • PNG belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect PNG to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of PNG from memory before moving on to harder problems.

Reference excerpt

Portable Network Graphics (PNG, officially pronounced PING, colloquially pronounced PEE-en-JEE) is a raster-graphics file format that supports lossless data compression. PNG was developed as an improved, non-patented replacement for Graphics Interchange Format (GIF). PNG supports palette-based images (with palettes of 24-bit RGB or 32-bit RGBA colors), grayscale images (with or without an alpha channel for transparency), 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 have the ".png" file extension and the "image/png" MIME media type. PNG was published as an informational RFC 2083 in March 1997 and as the standard ISO/IEC 15948:2004 in 2004.

History and development

The motivation for creating the PNG format was the announcement on 28 December 1994 that implementations of the Graphics Interchange Format (GIF) format would have to pay royalties to Unisys due to their patent of the Lempel–Ziv–Welch (LZW) data compression algorithm used in GIF. This led to a flurry of criticism from Usenet users. One of them was Thomas Boutell, who on 4 January 1995 posted a precursory discussion thread on the Usenet newsgroup "comp.graphics" in which he devised a plan for a free alternative to GIF. Other users in that thread put forth many propositions that would later be part of the final file format. Oliver Fromme, author of the popular JPEG viewer QPEG, proposed the PING name, eventually becoming PNG, a recursive acronym meaning PING is not GIF, and also the .png extension. Other suggestions later implemented included the deflate compression algorithm and 24-bit color support, the lack of the latter in GIF also motivating the team to create their file format. The group would become known as the PNG Development Group, and as the discussion rapidly expanded, it later used a mailing list associated with a CompuServe forum. The full specification of PNG was released under the approval of World Wide Web Consortium (W3C) on 1 October 1996, and later as RFC 2083 on 15 January 1997. The specification was revised on 31 December 1998 as version 1.1, which addressed technical problems for gamma and color correction. Version 1.2, released on 11 August 1999, added the iTXt chunk as the specification's only change, and a reformatted version of 1.2 was released as a second edition of the W3C standard on 10 November 2003, and as an International Standard (ISO/IEC 15948:2004) on 3 March 2004. Although GIF allows for animation, it was initially decided that PNG should be a single-image format. In 2001, the developers of PNG published the Multiple-image Network Graphics (MNG) format, with support for animation. MNG achieved moderate application support, but not enough among mainstream web browsers and no usage among web site designers or publishers. In 2008, certain Mozilla developers published the Animated Portable Network Graphics (APNG) format with similar goals. APNG is a format that is natively supported by Gecko- and Presto-based web browsers and is also commonly used for thumbnails on Sony's PlayStation Portable system (using the normal PNG file extension). In 2017, Chromium based browsers adopted APNG support. In January 2020, Microsoft Edge became Chromium based, thus inheriting support for APNG. With this all major browsers now support APNG. The PNG Working Group has been chartered by the W3C, since September 14, 2021, to maintain and develop for the PNG specification. The third edition of PNG specification, which adds the proper support of APNG, high dynamic range (HDR) and Exif data, was published as the first public working draft on October 25, 2022, and ultimately as a W3C Recommendation on June 24, 2025.

PNG Working Group The original PNG specification was authored by an ad hoc group of computer graphics experts and enthusiasts. Discussions and decisions about the format were conducted by email. The original authors listed on RFC 2083 are:

Editor: Thomas Boutell Contributing Editor: Tom Lane Authors (in alphabetical order by last name): Mark Adler, Thomas Boutell, Christian Brunschen, Adam M. Costello, Lee Daniel Crocker, Andreas Dilger, Oliver Fromme, Jean-loup Gailly, Chris Herborth, Aleks Jakulin, Neal Kettler, Tom Lane, Alexander Lehmann, Chris Lilley, Dave Martindale, Owen Mortensen, Keith S. Pickens, Robert P. Poole, Glenn Randers-Pehrson, Greg Roelofs, Willem van Schaik, Guy Schalnat, Paul Schmidt, Tim Wegner, Jeremy Wohl

File format

File header A PNG file starts with an eight-byte signature (refer to hex editor image on the right):

"Chunks" within the file After the header, comes a series of chunks, each of which conveys certain information about the image. Chunks declare themselves as critical or ancillary, and a program encountering an ancillary chunk that it does not understand can safely ignore it. This chunk-based storage layer structure, similar in concept to a container format or to Amiga's IFF, is designed to allow the PNG format to be extended while maintaining compatibility with older versions—it provides forward compatibility, and this same file structure (with different signature and chunks) is used in the associated MNG, JNG, and APNG formats. A chunk consists of four parts: length (4 bytes, big-endian), chunk type/name (4 bytes), chunk data (length bytes) and CRC (cyclic redundancy code/checksum; 4 bytes). The CRC is a network-byte-order CRC-32 computed over the chunk type and chunk data, but not the length.

… excerpt ends here. Continue reading the full article.

Illustrations

PNG illustration
PNG: The PNG image  viewed with a hex editor application for Ubuntu
The PNG image viewed with a hex editor application for Ubuntu
PNG: PNG's filter method 0 can use the data in pixels A, B, and C to predict the value for X.
PNG's filter method 0 can use the data in pixels A, B, and C to predict the value for X.
PNG: A PNG with 256 colors, which is only 251 bytes large with pre-filter. The same image as a GIF would be more than thirteen times larger.
A PNG with 256 colors, which is only 251 bytes large with pre-filter. The same image as a GIF would be more than thirteen times larger.
PNG: An illustration of Adam7 interlacing over a 16×16 image
An illustration of Adam7 interlacing over a 16×16 image

Worked examples

Example 1 — a first encounter with PNG

Start with the simplest possible case. Write down what PNG claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to PNG before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about PNG ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of PNG

In research
PNG appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses PNG in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
PNG is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer-related introductions in 1996, Graphics standards, ISO standards, so understanding it makes those chapters shorter.
In everyday life
Look for PNG outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study PNG in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what PNG means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain PNG out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is PNG in simple terms?

Portable Network Graphics (PNG, officially pronounced PING, colloquially pronounced PEE-en-JEE) is a raster-graphics file format that supports lossless data compression. PNG was developed as an improved, non-patented replacement for Graphics Interchange Format (GIF).

Why does PNG matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study PNG?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on PNG.

Tags

  • Computer-related introductions in 1996
  • Graphics standards
  • ISO standards
  • Image compression
  • Open formats
  • Portable Network Graphics
  • Raster graphics file formats
  • World Wide Web Consortium standards

Keep exploring