Portable Network Graphics is a raster graphics file format that supports lossless data compression. PNG was created as an improved, non-patented replacement for Graphics Interchange Format (GIF), and is the most widely used lossless image compression format on the Internet.
PNG supports palette-based images (with palettes of 24-bit RGB or 32-bit RGBA colors), grayscale images (with or without alpha channel for transparency), and full-color non-palette-based RGB/RGBA images (with or without alpha channel). PNG was designed for transferring images on the Internet, not for professional-quality print graphics, and therefore does not support non-RGB color spaces such as CMYK. 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 nearly always use file extension PNG
or png
and are assigned MIME media type image/png
. PNG was published as informational RFC 2083 in March 1997 and as an ISO/IEC standard in 2004.
It is expected to replace the Graphics Interchange Format (GIF) that is widely used on today’s Internet. Owned by Unisys, the GIF format and its usage in image-handling software involves licensing or other legal considerations. (Web users can make, view, and send GIF files freely but they can’t develop software that builds them without an arrangement with Unisys.) The PNG format, on the other hand, was developed by an Internet committee expressly to be patent-free. It provides a number of improvements over the GIF format.
When to Use PNG Files
PNG files are a great format to use but not necessarily in every situation. Sometimes a PNG can be way too large in size and not only use up unnecessary disk space or make it harder to email, but can also drastically slow down a web page if you’re using one there. So before you convert all of your images to PNG (don’t do that), there are some things to keep in mind.
JPEG files are useful when the image is low contrast, but PNGs are better when dealing with sharp contrast like when there are lines or text in the image, as well as large areas of solid color. Screenshots and illustrations, then, are best in PNG format while “real” photos are best as JPEG/JPG.