The PNG Guide is an eBook based on Greg Roelofs' book, originally published by O'Reilly.


This section defines some of the technical terms and acronyms used throughout the book. More glossary entries may be found in Section 11 of the PNG Specification, Version 1.1. Terms in italic are defined in this glossary.

alpha channel

A special channel that associates transparency (or opacity) with an image. An image without an alpha channel is considered to be completely opaque; an image with an alpha channel may be opaque in some areas, fully transparent in other areas, and partially transparent in still others. There are two types of alpha, associated and unassociated. Associated (or premultiplied) alpha replaces all of the nonalpha (color or grayscale) information in the image with the values it would have if the image were displayed against a black background; for example, in an RGB image with a premultiplied alpha channel, all RGB values in completely transparent regions are replaced by black pixels. This form can be rendered faster (especially against black backgrounds, where the alpha channel can be completely ignored), but it amounts to a lossy transformation of the image data. Unassociated alpha leaves the nonalpha values untouched; this is the kind supported by PNG.


American National Standards Institute, the U.S. standardization body responsible for such standards as the ANSI C programming language.


A procedure for reducing the appearance of jaggedness around high-contrast features such as lines or text in a raster image. Anti-aliasing effectively involves reducing the contrast slightly by mixing the two contrasting colors along their boundary. For example, a diagonal black bar on a white background would be rendered with some shades of gray along the edges, according to how the ideal geometric representation of the bar was situated relative to the positions of the pixels in the image.


American Standard Code for Information Interchange, a 7-bit code (which originally included an 8th bit for parity) that has become the de facto character standard for English text and programming languages. ASCII is also the least common denominator in other character sets, including Latin-1 (ISO/IEC 8859-1) and Unicode UTF-8.

aspect ratio

The ratio of a rectangle's width to its height. The aspect ratio of most computer monitors is 4:3, while that of U.S. high-definition television displays is 16:9. Individual pixels may also be considered to have an aspect ratio. On a 4:3 monitor that is displaying at the same ratio (for example, 1024 × 768 or 800 × 600), the pixels are square and therefore have a 1:1 aspect ratio. When such a monitor displays at 1280 × 1024, however, its pixels are slightly flattened and have an aspect ratio of 16:15.


A data format in which multibyte values are stored with the most significant values lowest in memory. This is the format used on Apple Macintosh computers and most Sun workstations, for example.

Big Two

Informal name for Netscape Navigator and Microsoft Internet Explorer, the two most influential web browsers in the world. Their support (or lack of it) for PNG was and is a critical factor in PNG's acceptance as an image format for the Web.


The collection of all information (specifically, samples) of a given type in an image. For example, the collection of all red samples defines one type of channel. RGB images have red, green, and blue channels.


The color components of an image or a color space, not including intensity information. In a YUV image, for example, Y is the intensity value; U and V are chromaticity values.


The fundamental building block of a PNG file and the means by which the specification may be extended in a backward- and forward-compatible way.


Commission Internationale de l'Éclairage, or the International Commission on Illumination, an international standards-making body.


Cyan, magenta, yellow, and black (the letter B is reserved for blue), the four pigments most often used in printing. Cyan, magenta, and yellow are the complements of red, green, and blue on the traditional color wheel.

color correction

Adjustment of the color values in an image in order to compensate for variations in the color output of various display devices--for example, between two monitors made by different manufacturers, or between a monitor and a color printer.

color depth

See pixel depth.


Another name for a palette; that is, a table of RGB color values (usually no more than 256) that is referenced by index in the main part of the image.

color space

A conceptual space in which colors are represented by discrete numerical values, almost always with a basis in the human visual system. RGB, YCbCr, YIQ, YUV and CIE XYZ are all examples of three-dimensional color spaces; CMYK is a four-dimensional example. Physical color, as in sunlight reflecting off leaves, can only be approximated by discrete values;[109] it is more accurately modeled as a function--specifically, intensity as a function of wavelength.

[109] Actually, one could imagine measuring the wavelength of every photon; the sum of all such measurements over a given interval of time (the ``exposure'') and at a given location on electronic film (a ``pixel'') would be a humongous list of discrete values. Within the limits of quantum mechanics (for a given pixel size, the wavelength can only be measured to a certain precision), it would be a completely accurate representation of physical color.


The act of encoding data into a smaller representation than its original form. See RLE for a simple example.

content negotiation

A handshaking procedure carried out between a web server and a web browser in order to determine the best format for a given piece of data. In the context of images, a server might have PNG, JPEG, GIF, and TIFF versions of the same image; content negotiation between the server and client determines which of the four formats is sent to the browser.


Cyclic Redundancy Check (or, more rarely, Cyclic Redundancy Code), an efficient means of checking for accidental corruption of data. The most common version, including that used in PNG, is 32 bits (``CRC-32''), but 16-bit CRCs were common in older applications.


Cathode-ray tube, the principal component of traditional monitors and television displays. Often used synonymously with ``monitor.''


The process of mixing dots (or pixels) of different colors together in the same region in order to give the appearance of other colors; often performed after an image has been quantized to a reduced number of colors, in order to spread the errors around more evenly. The procedure tends to reduce the contrast of sharp features and may introduce noticeable patterns in the image (as in the case of an ordered dither); it also reduces the compressibility of the image considerably, especially in the case of an error-diffusion dither.

error-diffusion dither

A specific dithering method in which quantization errors are diffused spatially in a quasi-random manner. This tends to be much slower than the usual alternative (an ordered dither), but the results generally look much better. The Floyd-Steinberg method is an example of an error-diffusion dither.


Frequently Asked Question list (or a single such question), a format for providing commonly requested information in public forums and on the Web. Sometimes also interpreted as ``Frequently Answered Questions.''


In PNG, a method of reversibly transforming the image data so that it will compress better when fed to the main compression engine. In the context of operating systems with command-line interfaces, a program that processes and optionally modifies the data within a command pipeline. For example, in the following pipeline, ppmquant acts purely as a filter, modifying the output of tifftopnm and feeding the results to the input of pnmtopng:

tifftopnm foo-24.tiff | ppmquant -floyd 256 | pnmtopng > foo-8.png

In the context of an LCD screen or other light-emitting device, a filter is simply a material that is transparent to some wavelengths of light (say, green) and opaque or nearly opaque to all others.

floating point

The usual means of storing very large or very small numbers, or numbers with a fractional part; when encoded in machine-readable form, the method involves a sign bit (positive or negative), a fractional part (the mantissa), and an exponent (in base 2). Other machine encodings for numbers include integer (the most common), fixed point, and plain text.


Of or pertaining to an object with fractional dimension and self-similarity at many or all scales; also, the name of such an object. The most famous fractal is the Mandelbrot set, which is basically a two-dimensional blob with a boundary of dimension greater than one but less than two. Around the boundary are tiny, distorted copies of the main blob, and each copy has its own copies nearby; this attribute is called self-similarity, and it is the basis for fractal compression.


File Transfer Protocol, one of the oldest means of transferring files over a network. It has been largely superseded on the Web by HTTP.

gamma correction

Adjustment of the intensity values of an image (loosely speaking, a combination of brightness and contrast) in order to compensate for variations in output devices. For example, images displayed on a standard Macintosh must be gamma-corrected to appear the same way they do on a standard PC, and vice versa.


Graphics Interchange Format, an image format designed by (and a service mark of) CompuServe. The GIF format is technically capable of storing 24-bit images, but only crudely; in practice, it is only an 8-bit, indexed-color format.


GNU Image Manipulation Program, an open Source image editor similar to Photoshop; originally called the General Image Manipulation Program. In the paper edition of this book, we referred to it as ``Gimp'' for readability (similar to ``Unix''), but it is an acronym.


GNU's Not Unix, a recursive acronym for the project led by Richard Stallman and the Free Software Foundation to create an entire Unix-like operating system (and associated tools) using only freely available, freely modifiable, and freely redistributable software.


GIMP Toolkit, a graphical toolkit originally designed for the GIMP image editor under Unix and the X Window System. Subsequently split off as a separate, application-independent project, GTK+ is currently being ported to 32-bit Windows, as well. GTK+ is in some ways similar to the Motif toolkit for X (for those who are familiar with that), but unlike Motif, GTK+ is freely available in source-code form and may be integrated, distributed, and modified without license fees or royalties.


Hypertext Markup Language, the format used for web pages.


Hypertext Transfer Protocol, the most common means by which web pages, images and other associated files are transferred between machines. A related but older protocol is FTP.


Internet Assigned Numbers Authority, the official registration authority for such things as Internet media types (e.g., image/png).


Internet Corporation for Assigned Names and Numbers, the presumed successor to IANA.


International Color Consortium, an industry body whose goal is to promote and standardize cross-platform color management.


The International Electrotechnical Commission, an international standards-making body. See also ISO.


Internet Engineering Steering Group, the administrative body of the IETF. Members of the IESG manage groups of IETF working groups.


Internet Engineering Task Force, an open development group whose purpose is to evolve and standardize the Internet and its protocols.

indexed color

Another term used to describe palette-based images; synonyms include colormapped and pseudocolor.


A method of reordering image data so that an approximate version of the whole image may be displayed quickly, and later refined as more of the image data becomes available.


The International Organization for Standardization, perhaps the best-known international standards-making body. The ISO and IEC often collaborate on standards of mutual interest; JTC 1 is one of their Joint Technical Committees.


International Telecommunication Union, an international standards-making body specializing in telecommunications networks and services.


JPEG File Interchange Format, the most common file format for JPEG images. (TIFF is another file format that can be used to store JPEG images, and JNG is a third.) JFIF is not a formal standard; it was designed by a group of companies (though it is most often associated with C-Cube Microsystems, one of whose employees published it) and became a de facto industry standard.


JPEG Network Graphics, the name of the subset of MNG that can be used to store JPEG images with an optional alpha channel.


Joint Photographic Experts Group, the informal name for the group that defined the image-encoding standard that bears their name. JPEG (the standard, which is also known as ISO/IEC 10918-1) is capable of compressing photographic (``continuous-tone'') images quite highly with little or no visible degradation of quality--that is, without visible artifacts or loss of detail. JPEG itself is not a file format, however; see JFIF, JNG, and SPIFF.


A new standard for lossless and near-lossless compression of photographic images, also known as ISO/IEC 14495-1 and ITU Recommendation T.87. See also LOCO-I.


Liquid crystal display, a technology used in most notebook displays and, thanks to its flat geometry and relatively light weight, more and more desktop displays.


A data format in which multibyte values are stored with the least significant values lowest in memory. This is the format used on standard Intel (x86-based) PCs and Digital workstations, for example.


Low-Complexity Lossless Compression for Images, an algorithm developed at Hewlett-Packard Laboratories that forms the basis for the JPEG-LS standard.

look-ahead buffer

A block of yet-to-be-encoded data that is scanned as part of a ``greedy'' algorithm, in order to see whether a better choice (compression-wise) is just ahead, so to speak.

lossless compression

Any compression method that allows for the exact reconstruction of the original data, bit for bit. This is the type of compression used in PNG and essentially all compressors of textual data, such as Zip and gzip.

lossy compression

Any compression method that allows only an approximate reconstruction of the original data. Common forms of JPEG fall into this class.


Lookup table, a means of storing data that would otherwise require an unreasonable amount of resources. For example, a palette is a type of lookup table that allows image data to be encoded indirectly, thereby reducing its overall space requirements. Gamma correction, on the other hand, has potentially large computational requirements, since it involves the use of exponential functions. Calculating the exponentials once for every possible sample value and storing the results in a lookup table is almost always more efficient than computing an exponential for every sample in the image.


A class of lossless compression algorithms deriving from two seminal papers by Jacob Ziv and Abraham Lempel, first published in 1977 and 1978.


Multimedia/Hypermedia Experts Group, the informal name for the group that defined the HTML-like standard that also bears their name. MHEG (the standard, which is also known as ISO/IEC 13522) may be thought of as a next-generation teletext with graphics, video, and interactive capabilities in addition to text. MHEG-5 is the small-footprint subset that is designed to work well on digital set-top boxes; it has been adopted in parts of Europe and is expected to be used in Asia as well. The United Kingdom's profile for MHEG-5 on digital terrestrial television defines precisely what data formats are allowed within the MHEG-5 framework, and one of the two formats it allows for bitmapped images is PNG.


One-millionth of a meter; also known as a micrometer and abbreviated μm.


Multiple-image Network Graphics, PNG's multi-image extension. MNG can be used for animations, slide shows, collections of image parts (such as palettes) or even single images that are generated algorithmically.

Moore's Law

An empirical prediction first made in 1965 by Intel's Gordon Moore, who observed that the capacity of memory chips had increased by a factor of two every 12 months or so. The law was later applied to microprocessors and revised slightly to its current (unofficial) form, which states that computational power increases by a factor of two every 18 months. It is now so well established that it may actually amount to a self-fulfilling prophecy, due to chip-makers' fears that their competitors will maintain such a rate of improvement. So far, it has held for 17 doublings, representing a performance increase of more than five orders of magnitude since 1971. See for a 1997 graph of the trend and for a nice historical overview.


Microsoft Internet Explorer, a web browser.

ordered dither

A specific dithering method in which color values are modified in individual blocks of pixels, usually of sizes between 4 × 4 and 16 × 16. This method is quite fast but tends to leave the image with a very grainy, patterned appearance; an error-diffusion dither will almost always look better.

Paeth predictor

One of the filter types used in PNG as a precursor to compression; invented by Alan W. Paeth.


A table of RGB color values that is referenced by index in the main image data. Since a table of 256 or fewer colors can be referenced by an 8-bit index, a large palette-based (or colormapped) image can be stored in roughly one-third the space of the corresponding RGB version. For very small images, the overhead of a 768-byte palette may outweigh the savings due to smaller pixels (that is, 8 bits per pixel instead of 24). And images with more than 256 colors either need a larger palette (and therefore larger indices) or must be edited to use 256 or fewer colors in order to be stored in a palette-based format. PNG supports palettes of 256 or fewer colors.


A chemical compound that emits visible light when struck by energetic electrons, which is the usual arrangement within a cathode-ray tube, or CRT. Cathode rays are, in fact, electrons accelerated via high-voltage plates to an energy capable of exciting the three phosphor types at the front of a monitor.


A single grid point (or ``dot'') in a raster image; composed of one sample from each channel. Most computer images are composed of pixels.

pixel depth

The total number of bits used to represent a single pixel. In a truecolor or grayscale image, with or without an alpha channel, the pixel depth is therefore equal to the product of the sample depth and the number of channels. For example, an RGBA image (four channels) with 16 bits per sample would have a pixel depth of 64 bits. In the case of channels with unequal sample depths, simply add the number of bits for each channel; e.g., on a typical PC ``high-color'' display, the number of bits for red, green, and blue channels is usually five, six, and five bits, respectively, resulting in 16-bit pixels. PNG channels in a given image always have equal sample depths.


Portable Network Graphics, the subject of this book. Version 1.0 of the specification was the first W3C Recommendation (``01-October-1996'') and Internet RFC 2083. Version 1.1 was approved by the PNG Development Group in October 1998 and released publicly on 31 December 1998. A subsequent version, differing only in editorial structure, formatting, and the addition of one more recently approved chunk (iTXt), is currently under review by Joint Technical Committee 1, Subcommittee 24, of the ISO/IEC; it will become version 1.2 of the PNG spec and officially will be known as ISO/IEC 15948 upon approval as an international standard.

PNG Development Group

The Internet-based working group that designed PNG in 1995 and continues to discuss and occasionally approve extensions to it, usually in the form of new chunk types. Development takes place via two mailing lists, and interested parties may join by following the instructions at .


Point-to-Point Protocol, a networking protocol commonly used in computers connected to the Internet with modems.


Another name for palette-based images, also known as colormapped or indexed color. In contrast, an RGB image is known as truecolor. (Grayscale images are simply grayscale.)


The process of reducing an image with many colors to one with fewer colors, usually in preparation for its conversion to a palette-based image. As a result, most parts of the image (that is, most of its pixels) are given slightly different colors, which amounts to a certain level of error at each location. Since photographic images usually have extended regions of similar colors that get converted to the same quantized color, a quantized image tends to have a flat or banded (contoured) appearance unless it is also dithered.

raster image

An image composed of a rectangular array of colored or grayscale dots (see also pixel). This is the only type of image officially supported by the PNG format. Such images have a fixed size (as measured in dots) and can be enlarged or reduced only imperfectly.


A computationally intensive method of generating photorealistic images, by tracing virtual rays of light back from the image plane into the scene and calculating their behavior in reverse. Reflection, refraction, and shadows can be modeled quite nicely, although one can use a ``radiosity'' program for even more realistic images.


Request for Comments, the IETF's name for its standards, recommendations, and technical notes. RFCs fall into two categories, Internet Standards and Informational RFCs; the PNG 1.0 specification was approved as one of the latter, which are less formal. As with most such bodies, the IETF recognizes other standards organizations such as the W3C and ISO, and it will refuse to accept a format or protocol for its own standardization process if another standards body has already done so for the same content.


The most common color space in computing, representing colors as combinations of red, green, and blue values. This model matches the design of color monitors and LCD panels, which use red, green, and blue phosphors and filters, respectively.


Red, green, blue, alpha. This is the usual format for partially transparent color images.


Run-length encoding, a very simple compression method in which runs of repeated bytes are replaced by (length,value) pairs. For example, the 12-byte sequence 0 0 0 0 0 9 9 9 9 9 9 9 could instead be encoded as the 4-byte sequence 5 0 7 9, which would be interpreted as ``five zeros followed by seven nines.''


One of the values associated with a single pixel; for example, the red value of a given pixel is a sample. RGB images have three samples per pixel; RGBA images have four; grayscale images have one. In a palette-based image, samples are associated with the palette, not the pixels.

sample depth

The number of bits used to store a sample. For example, a 24-bit RGB image uses 8 bits per sample; a 48-bit RGB image or 16-bit grayscale image uses 16 bits per sample. Thus, the sample depth has to do with the precision of each color value--that is, the extent to which it can differ from its nearest neighbors. In a palette-based image, the sample depth refers to the palette entries; it is always 8 bits in PNG, even if the pixel depth is smaller.

scientific notation

A means of compactly representing very large or very small numbers as the product of a decimal value (between 1 and 10) and a power of 10. For example, there are 86,400 seconds in a day; in scientific notation, that value would be written 8.64 × 10 4 . A much larger example is Avogadro's number (from chemistry), which is approximately 6.02 × 10 23 . On the other end of the scale, the mass of an electron is roughly 9.11 × 10 -31 kilograms.

sliding window

A central component of the LZ77 class of compression algorithms, in which a window of fixed width is imagined to slide over already-processed data as the current location is advanced. This window indicates the region in which LZ77's relative pointers (or [distance,length] pairs) are valid.


Still Picture Interchange File Format, the successor to JFIF and an official standard for JPEG image files.


Standard RGB color space, a means of specifying precisely how any given RGB value should appear on a monitor or printed paper or any other output device. sRGB was promoted by the ICC and submitted for standardization by the IEC.

suggested quantization

If a truecolor image will be viewed on systems capable of displaying only 256 (or fewer) colors, an encoder may take the additional step of finding one or more preferred sets of colors to which the image may be quantized most effectively. This avoids the necessity of decoders on such systems having to scan the entire image before displaying anything; with the suggested quantization (or ``suggested palette''), they can immediately begin mapping image colors to the reduced set and display the image data without delay.


In 3D rendering engines where performance is limited by the number of polygons visible in any given scene, texture-mapping is a computationally inexpensive means of applying a pattern to an otherwise basic polygon in order to make it appear more complex and/or realistic. For example, a simple rectangle can be made to look like a brick wall by applying the image of a repeating (tiled) brick pattern to it; such an image is called a texture. Secondary textures, such as light (or shadow) maps and bump maps, can add even more realism, at minimal rendering cost.


Tagged Image File Format, a file format designed by Aldus (now Adobe). TIFF supports virtually every image type and color space imaginable, with a file structure that is practically arbitrary and half a dozen possible compression methods. As such, it is not fully supported by any application in the world, and it has been plagued by incompatibilities over the years. A subset is widely supported by scanner and image-editing software on multiple platforms, however.

transfer function

In general terms, the functional relationship between two quantities, such as an input voltage and an output light intensity, or an input range of digital values and an output range of digital values. This is a useful concept for describing the pipeline an image takes, say, from light entering a camera lens to RGB data in computer memory to voltages in a CRT to the light emitted from the monitor.


Another name for RGB images; that is, capable of representing a very large number of colors (usually anything up to 16.8 million, or even more) without resorting to quantization and dithering.


Uniform Resource Locator, the standard means of specifying networked resources such as web pages. The format typically involves a protocol name (e.g., http or ftp), an Internet hostname or IP number, an optional port number, and a path specification on the given host; these parts are separated by certain punctuation (colons, forward slashes, etc.).


Coordinated Universal Time, the standard time reference for Earth and the human race. Knowing the UTC time and one's timezone offset from it, it is possible to calculate the local time--for example, 1:00 PM UTC corresponds to 3:00 AM Pacific Standard Time (on the same day). UTC is almost the same thing as Greenwich Mean Time (GMT), which was originally used as the standard time reference.


VRML Architecture Group, the body that drove the design and standardization of VRML 2.0 (also known as VRML97).

vector image

An image whose most basic elements consist of lines, arcs, polygons, and so forth. Such an image can be scaled arbitrarily without introducing fuzziness or other artifacts. Many PostScript images fall into this category, though PostScript also supports raster images. Windows metafiles and Adobe Type 1 fonts are other examples of vector images.


Virtual Reality Modeling Language, the current standard for 3D objects and animations on the World Wide Web.


World Wide Web Consortium, a commercially funded body that standardizes (via Recommendations) protocols and formats for the Web. PNG and HTTP are examples of such standards.


A standard color space for more than half a century. Like RGB, YC b C r and others, XYZ has its basis in the human visual system; unlike most of them, however, it is a device-independent color space and is the preferred intermediary for conversions between other color spaces.


The year 10,000, an impending problem for software that stores years as four ASCII digits (as in the string "1963").


The year 2038, an impending problem for many current Unix systems, which store dates as four-byte, signed integers representing the number of seconds since 1 January 1970. At roughly 3:14 AM UTC on 19 January 2038 (which is either 18 January or 19 January elsewhere in the world, depending on one's timezone), such systems will flash back to December 1901. Unix systems that store dates as unsigned four-byte integers are OK until early February 2106.


The year 2000, an impending problem for software that stores years as two ASCII digits (as in the string "63"). This particular problem has been generating a great deal of excitement (money to be made), fear (problems) and loathing (lawsuits) lately.


Three color spaces that approximately model how color is interpreted by the human visual system, with an intensity value and two color values. Color JPEG images almost always use the YCbCr color space instead of RGB.

Last Update: 2010-Nov-26