PNG at a glance
- Stands for
- Portable Network Graphics (or “PNG’s Not GIF”)
- Pronounced
- Ping
- File extension
-
.png - Inventors
- Tom Boutell, Tom Lane, Greg Roelofs, others (see RFC 2083)
- Created
- Version 1.0, 1996; Version 1.1, 1998
- Standards
- World Wide Web Consortium
recommendation 1996,
RFC 2083 1997, ISO 15948 - Colors & bit depth
- 1, 2, 4, 8 bit paletized;
- 1,2,4,8,16 bit greyscale;
- 16, 32 greyscale with alpha;
- 24, 48 bit true color
- 32, 64 bit true color with alpha
- Transparency
- Single color 100% transparent (like GIF), variable transparency
(256 levels of transparency per pixel) - Optional Goodies
- 48 bit support
- Embedded Gamma information
- Color profiles (ICC)
- XMP metadata
- Interlacing (progressive rendering)
- Compression
- Lossless – “deflation”
- How it works
- “For each image line, a filter method is chosen which predicts
the colour of each pixel based on the colours of previous pixels
and subtracts the predicted colour of the pixel from the actual
color. An image line filtered in this way is often more
compressible than the raw image line would be. On most images,
PNG can achieve greater compression than GIF, but some
implementations make poor choices of filter methods and therefore
produce unnecessarily large PNG files.” – Wikipedia - Links
-
- Wikipedia article on PNG
- PNG home site – Lots of history, demos (how well does your web browser support PNGs?), utilities
- PNG spec – Actually pretty readable.
Portable Network Graphics (PNG) is a bitmapped image format that employs lossless data compression. PNG was created to improve upon and replace GIF (Graphics Interchange Format) as an image-file format not requiring a patent license. It is pronounced /ˈpɪŋ/ or spelled out as P-N-G. The PNG initialism is optionally recursive, unofficially standing for “PNG’s Not GIF”.
PNG supports palette-based (palettes of 24-bit RGB colors), greyscale or RGB images. PNG was designed for transferring images on the Internet, not professional graphics, and so does not support other color spaces (such as CMYK).
PNG Is Good For
1. Wherever you’d use GIF
The PNG compression is usually better than GIF’s LZW.
2. Allows really tiny (e.g., 2-color) pallette
Smaller palettes mean smaller files.
3. Images with variable (alpha) transparency
You may have seen people referring to “32-bit color” when they
really mean 24-bit color (8 bits for red, 8 for green, and 8 for
blue). 32-bit images have a separate channel for transparency.
Every pixel has 8 bits of red, 8 of green, 8 of blue,
and 8 of alpha (transparency). For 64 bit RGBA images each pixel has 48 bits for describing color (3 channels of 16 bits) and 16 bits for alpha.
MSIE for Windows doesn’t support variable transparency (though it does support
one-color transparency in both PNGs and GIFs). There is a workaround by using a filter called DXImageTransform though.
Modern web browsers like Opera,
Mozilla, and
Firefox all
support variable PNG transparency, so they let the background
through.
Microsoft has fixed MSIE for Windows so that
variable transparency works now in version 7 and above.
Second best way to archive images
PNG is a fine choice to store compressed copies of your original images, and it wastes a lot less disk space than formats like .bmp or TIFF.
PNG Is Bad For
1. Won’t substitute for GIF animation
There’s no equivalent to GIF animation in PNG. However, look at MNGs. Still
experimental at this writing, but an open standard.
2. Full color images will probably be bigger than equivalent JPEGs
Not much can be done about that. PNGs weren’t designed to be a
substitute for JPEGs, and they’re not. You’re going to get better
compression with lossy compression than you will with lossless
compression, and that’s that. Still, if you’ve got a photograph
that really, truly only has a few colors, try saving it as a PNG
and compare file sizes with your JPEG file. You never know.
This article is a modified version of the one found at:
http://web-building.crispen.org/formats/png.html with necessary corrections and improvements.

No comments
Comments feed for this article
Trackback link
http://luci.criosweb.ro/riot/2008/07/png-description/trackback/