Portable Network Graphics (PNG)

PNG is an open and non-patented image file format which supports lossless data compression and has become one of the most frequently used uncompressed raster graphics formats online.

What Are Portable Network Graphics?

PNG (Portable Network Graphics) is an image file format designed to support lossless data compression with transparent backgrounds, initially developed as a replacement for GIF and used widely on the Web, in computer graphics programs, and as 2D and 3D Computer Aided Design raster images. PNG also makes for an excellent format to store photographic images as it preserves more details than JPEG; The Library of Congress recommends PNG as one format to store photographic and other graphic images digitally including icons.

An image file contains pixels represented as integers (a tuple of x for each component). Pixels are packed into scanlines, with samples stored network byte order, MSB first. PNG requires its encoder to apply filtering before compression.  Various filters exist which allow him/her to choose which filter type they will apply in each scanline via special bytes that precede each filtered scanline in precompression datastreams.

Encoding software also enables an encoder to set individual scanlines a gamma value that will affect how sample values are quantized and stored in files, and decoders may apply gamma correction to display images on devices with differing gamma values than that of original scenes.  Encoders may additionally individually gamma encode each pixel for storage.  This method should be preferred when images will be shown on devices with standardized gamma values like 1.0.

Encoding images may also include a cHRM chunk to specify the RGB primary colors used, which a decoder can then use to produce an accurate grayscale representation suitable for display on monitors with a CCIR 709 primary gamut. Alternately, decoding may produce approximate grayscale representations by converting sample values from RGB to YCbCr using a lookup table that corresponds with their monitor’s gamma.

History Of PNG

PNG files provide lossless image compression that has almost completely replaced GIFs as an image file format. They have also become commonplace across other forms like PDFs and web technologies like HTML/CSS languages like CSS. Like its more famous JPEG counterpart, PNG images retain all information when decompressed without losing quality over time.  This allows for smaller file sizes than GIFs while also being lower quality images.

The original PNG specification was published as RFC 2083 in October 1996 and became a W3C Recommendation in November 2000. It comprises several Chunk Types which may be combined in any order.  Each must consist of at least one IHDR chunk followed by any number of IDAT chunks followed by an IEND chunk which serves as the end of file. Each chunk may include its length field which represents how much bytes its data field contains.  Its chunk type code determines whether its chunk should be classified as critical or ancillary.  Programs encountering such files must still be able to interpret and read their contents properly before moving onto other parts of file.

PNG excels over GIF by supporting an extensive array of color depths ranging from 8-bit indexed to 24-bit truecolor, and even alpha channels, making files significantly smaller than those reduced to limited palette GIFs, although still significantly smaller than one truecolor pixel GIFs.

PNG files provide another key advantage by supporting transparent backgrounds, which allow for the creation of buttons and other elements with transparent surfaces. This makes PNG particularly suitable for websites requiring high levels of detail in their graphic backgrounds, including websites and print documents.

PNG files provide the advantage of transparent backgrounds, making them the perfect format for website logos when working with older browsers that do not support CSS style properties.

The Use Of PNG

PNG provides an extensible format for lossless, portable, well-compressed storage of bit-mapped images on the World Wide Web. Specifically intended as an open and patent-free alternative to GIF for use online, but isn’t limited to that use case. Fully streamable with progressive display option and supporting index color images as well as grayscale, RGB (referred to in its specification), truecolor RGB data plus transparency alpha channels make PNG perfect for web use. Furthermore, its specification also defines simple text formats to store text while its compression method makes files significantly smaller than GIFs.

PNG files use a “chunk”-based structure similar to that employed by Amiga’s IFF format and allow for expansion without breaking backward compatibility. Each chunk provides information about an image.  Those not required should be marked so programs that do not recognize them can ignore them.  Critical chunks must also be marked so a decoder can recognize what data type lies within and process accordingly.

Bytes are packed tightly into scanlines so no bits are wasted between pixels, with network byte order (MSB first) used for storage of pixels smaller than one byte and pixels smaller than that size not crossing over into adjacent bytes; rather they remain within their own respective bytes with high order bits assigned for placement on subsequent bytes; 8 bits minimum bit depth allowed with 16 bit maximums permitted.

PNG supports the creation of private chunks to store non-critical data. Such chunks must be identified as non-essential, appearing near the start of an image file so a standard decoder does not have to read very far before realizing they cannot handle the image. Any private chunks essential to specific applications should be clearly labeled and must not appear publicly available software or files.

PNG requires decoders to accept both indexed-color and truecolor images, and be capable of reducing them down to a lower sample depth (data precision) for display on hardware that cannot support all available pixel values. This process is known as color quantization, and there are various implementations available.

PNG In The Future

PNG file formats offer several distinct advantages over other popular image file types, including transparency backgrounds and lossless compression. They also permit quick resizing without quality loss. They can store image metadata like keywords, author information and copyright details, making them perfect for digital design projects.

Format is optimized to enable low bandwidth requirements when transmitting images over the internet, and offers transparency and high color depth support that makes it ideal for high-quality graphic images like company logos, banners and illustrations. In fact, it has often become the default choice on websites due to its ability to maintain more detail than other file formats.

PNG is a streamable image format with progressive display capability that helps reduce bandwidth requirements for web-based applications. This type of file supports index color, grayscale and RGB image data up to 16 bits per channel and may incorporate full ICC color profiles for accurate color matching across heterogeneous systems as well as gamma correction and simple transparency (alpha channel).

In order to enhance compressibility, PNG specifications allow filtering pixel values prior to their encoding into PNG bitstreams. While this option exists, its practical implementation should be avoided as filtering may cause images to look “muddy” or distort the actual picture.

PNG supports an impressive variety of colors, but perhaps its most distinctive feature is transparent images. This capability enables designers and web page content editors to seamlessly blend graphics with other images or website content. PNG also makes an excellent alternative to JPEG when it comes to displaying high-contrast, low-bitrate photos because its pixels do not compress together and support higher color resolutions.

PNG files allow the inclusion of XMP or EXIF metadata, but implementation varies widely and there are no standards. To best meet your needs for this task, a separate file format may be better as accessing these formats requires programs with explicit access rights for them to read them directly. New chunk types may also be added when their usage becomes clear and critical; an implementation option that may become available over time is possible when PNGs become an image format of choice for such purposes.

Similar Posts