|PNG IMAGE FORMAT|
An Image Tute by Flo Deems
|Although there are many formats of image files, most of us use only 3: JPEG (JPG), GIF, and PNG on webpages. Each image format handles different quantities and qualities of colors.|
What is the PNG (Portable Network Graphics) image format?|
- Alpha channel (variable transparency).
PNG can store 4 bytes - red, green, blue plus alpha (channels) - on each pixel in it. There can be up to 254 levels of partial transparency.
GIF format selects one of its 256 colors to serve as the transparency channel. So a GIF pixel will be either totally transparent or totally opaque.
- Built-in gamma correction (cross-platform image brightness control).
- 2-dimensional interlacing (progressive display). Generally, a PNG file will load faster than a GIF file of the same image, even if the file size is much larger.
- Single-image format only (no animation - multi-file).
- Compression: PNG compresses better without loss (lossless) than any other format. There are also no patent fees. Compresses better than the GIF format (5-25%), depending on choice of image type.
- Image editing: since PNG is a lossless format, it is great to use for intermediate stages of editing before selecting the final image format output type.
Image Magick uses a different image format for intermediate work - editing, saving, re-editing, etc.
JPGs lose quality each time they are manipulated and saved. But it's almost always better to convert an image to a JPEG when finished editing an image. The savings in file size can be tremendous.
- Bit depth support: 8-, 16-, 32-, 48-bit truecolor and up to 16-bit grayscale.
- Image types: PNG supports truecolor, grayscale and palette-based (8-bit).
JPEG supports truecolor and grayscale.
GIF supports palette-based only. A "gray" GIF is a fake - it uses a gray palette.
- Raster format: The PNG image is composed of individual pixels.
A Few Tidbits of Info
- PNG is correctly pronounced "ping." Not "pee en gee"
- GIF is correctly pronounced "jif" - with a soft "g" instead of a hard g.
- JPG is correctly pronounced "jay peg"
- When making buttons, use either the PNG or the GIF formats, but reduce the color number to only those colors needed to make the button look its best. Otherwise you waste file space.
- There are 16,777,216 possible discrete 24-bit colors! But most PNGs and JPGs will have around 50,000 or less colors. A GIF will have only up to 256 colors. So for richness of color details, PNGs and JPGs can't be beat.