PNG

From TheAlmightyGuru
Jump to: navigation, search

Portable Network Graphic, abbreviated to PNG and vocalized as "peeng," is a free and open source raster graphic format created by the PNG Development Group in 1996. It was designed to serve as a replacement for older bitmap graphic formats like BMP, GIF, PCX, and the like. The format supports from 1-bit to 64-bit color, interlacing, compression, has integrity checks, and allows for custom meta data. It does not support some of the rarer color depths like 15 or 16-bit, non-RGB color spaces, or higher-level compression. The format has native support in every major operating system and Web browser. Although WEBP has superseded the format in every way, PNG is still viewed as the Internet standard for raster bitmaps.

Personal

Having become interested in graphic formats in the late 1990s, I started to research the various raster bitmap formats and quickly found PNG to be the most impressive. Although it didn't have wide support among browsers (it took Internet Explorer years to add support for the alpha channel), I still began using it as my favorite bitmap format since it compressed better than GIF and could support more than 8-bit color. Although it has since been superseded by WEBP, I still primarily use PNG because it now has such widespread use and typically does everything I need it to do.

Technical

Compression

PNG uses DEFLATE for compression which is the same algorithm used in standard ZIP archives. Although the algorithm is not optimized for graphics, the fact that it was free and open source made it the best candidate at the time. It was also superior from the LZW algorithm used in GIF, and almost always yielded better results. More recent formats like WEBP use compression algorithms better suited for bitmap graphics, but, with a compression optimizer like PNGOut, PNG images can achieve pretty good compression.

Colors

Since it was designed to be used on computer monitors, PNG only supports the RGB color space. If you require CYMK or something else, you'll need to use a different format.

In order make best use of compression, PNG supports a multitude of color depths. Indexed palettes are supported with bit depths of 1, 2, 4, and 8, each with an 8-bit channel depth. Each depth lets you sacrifice one index for binary transparency. PNG also has special support for 8-bit grayscale. For true-color options, PNG supports 24-bit RGB color with 8-bits per channel, and 32-bit color with an additional 8-bit channel for alpha. Both of these can be doubled to 16-bit per color channel resulting in 48-bit and 64-bit color. It does not support the more exotic color depths like 6, 15 or 16-bit color.

Interlacing

When PNG was first designed, interlacing was still popular as network traffic was quite slow. PNG's interlacing uses the Adam7 algorithm which offers better visibility in less time than from the interlacing of GIF. However, interlacing typically reduces the images ability to compress and result in larger file sizes. Since network speeds have drastically increased over the years, interlacing is now used far less.

Derivatives

PNG succeeded in supplanting GIF as the raster bitmap graphic format, and the designers hoped to supplant other formats as well including animated GIF and JPEG. In 2001, the designers released two derivative formats, MNG and JNG. MNG was meant to replace animated GIFs and JNG was a container format for JPEG which allowed for all the features of JPEG, but with an alpha transparency channel. Neither were very successful and few graphics programs adopted the formats. MNG, though it supported a slew of new features, was too difficult to implement, and JNG didn't really offer anything that graphic designers wanted as lossy compression is typically used for photographs, and they don't really benefit from transparency. Both animated GIFs and JPEG continued to be used for decades after MNG and JNG were released. The designers of MNG tried again with APNG in 2008, which is much closer to the format of animated GIF, but, by that time, Flash animation had gained dominance and there were several video formats to work with as well, so animated GIFs were a dying format.

Software

Program Functions Notes
Blender Open, Edit, Save PNG is the default format for textures. Doesn't support most low bit depths.
Corel Draw Open, Save Can import and export to PNG. Supports some features.
Corel Photo-Paint Open, Edit, Save Supports interlacing and transparency. Supports most features, but has display problems with some lower bit depths.
GraphicsGale Open, Edit, Save Supports every color depth up to 32-bit, except 2-bit and grayscale. Doesn't support interlacing.
ImageMagick Open, Edit, Save Supports all color depths and interlacing. Also supports MNG, JNG, and APNG.
Inkscape Open, Save Can import and export to PNG.
IrfanView Open Can open and display PNG images with any format option.
PNGOut Open, Save Can convert several formats to PNG and significantly increase the compression ratio or existing PNGs.
LibreOffice Open, Save Can import and export to PNG.
Paint.net Open, Edit, Save Supports all color depths up to 32-bit and interlacing.
XPDF Save Can extract PNG images from PDF files or render pages to PNG format.

Links

Link-Wikipedia.png