PNG

From TheAlmightyGuru
Revision as of 11:07, 5 May 2021 by TheAlmightyGuru (talk | contribs) (Created page with "'''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 w...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 32-bit color, interlacing, compression, has integrity checks, and allows for custom meta data. It does not support 48-bit or higher color, non-RGB color spaces, or higher-level compression. For over a decade it was the standard for bitmap-based graphics on the Internet.

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, 24-bit RGB color with 8-bits per channel, and 32-bit color with an additional 8-bit channel for alpha. It does not support 16 or 48-bit color depths.

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 space-saving features.
Corel Draw Open, Save Can import and export to PNG.
Corel Photo-Paint Open, Edit, Save Supports interlacing and transparency. Had problems with color depths of 1, 2 and 4 in the past. Can save into depths of 1, 8, 24, and 32. Supports interlacing.
GraphicsGale Open, Edit, Save Supports every color depth except 2-bit and grayscale.
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 and interlacing.
XPDF Save Can extract PNG images from PDF files or render pages to PNG format.

Links

Link-Wikipedia.png