IntroWebGraphics.png (35161 bytes)

Web Graphic File Formats:  GIF, JPG & PNG

High quality graphic images can be quite large, with file sizes that would make displaying them on a web page prohibitatively time consumming.   When discussing web graphics, we need to discuss file compression techniques.  There are basically two types of compression methods: lossy and lossless. Lossy compression creates smaller files by discarding some information about the original image. It removes details and color changes it deems too small for the human eye to differentiate. Lossless compression, on the other hand, never discards any information about the original file.

GIF

Graphics Interchange Format.  A lossless compression format for images developed by CompuServe in the late 1980s,  using the compression algorithm patented by UNISYS.  The LZW compression routine used in Gifs is the same one found in zip files.  The    most  common types of images used on the Web are Gifs.    The biggest limitation of GIFs is that they can only contain up to 256 different colors.  The GIF 89a format allows for the creation of transparent,  interlaced and animated gifs.

JPEG  graphic format:

JPEG or JPG is a graphics file format that was devised by a committee called the Joint Photographic Expert's Group.   It refers to a set of formats that support full-color images and stores them in a compressed from.  JPEG is a 24-bit storage formats that allow for 16,777,216 Colors.  It is a standardized image compression mechanism, designed for  compressing either full-color or gray-scale images of natural, real-world scenes.  It works well on photographs, artwork but not so well on line drawings, cartoons and  lettering.  

Using JPEG compression, most images can be compressed up to 20:1 without noticeable loss of quality; some can be compressed as much as 50:1.  The JPG format is a lossy compression, but the user may to choose how much trade-off of quality for storage space they wish.   That is a JPeg image can be saved in low, medium, high and maximum resolution.

PNG format:

PNG stands for Portabel Network Graphics, and the format was devised in 1995 by the W3C and CompuServe in response to controversies over GIF licensing.     PNG provides a patent-free replacement for GIF and can also replace many common uses of TIFF. Indexed-color, grayscale, and true color images are supported, plus an optional alpha channel for transparency. Sample depths range from 1 to 16 bits. The Internet Media Type image/png was approved on 14 October 1996.   The PNG Homesite.

    

Last updated on 11/23/2004  by L.M. Hicks