GIF (Graphics Interchange Format, .gif)
The Graphics Interchange Format (GIF) is an 8-bit-per-pixel bitmap image format that was introduced by CompuServe in 1987 and has since come into widespread usage on the World Wide Web due to its wide support and portability.
The format uses a palette of up to 256 distinct colors from the 24-bit RGB color space. It also supports animations and allows a separate palette of 256 colors for each frame. The color limitation makes the GIF format unsuitable for reproducing color photographs and other images with continuous color, but it is well-suited for more simple images such as graphics or logos with solid areas of color.
GIF images are compressed using the Lempel-Ziv-Welch (LZW) lossless data compression technique to reduce the file size without degrading the visual quality. This compression technique was patented in 1985. Controversy over the licensing agreement between the patent holder, Unisys, and CompuServe in 1994 inspired the development of the Portable Network Graphics (PNG) standard; since then all the relevant patents have expired.
CompuServe introduced the GIF format in 1987 to provide a color image format for their file downloading areas, replacing their earlier RLE format, which was black and white only. GIF became popular because it used LZW data compression, which was more efficient than the run-length encoding that formats such as PCX and MacPaint used, and fairly large images could therefore be downloaded in a reasonable amount of time, even with very slow modems.
The original version of the GIF format was called 87a. In 1989, CompuServe devised an enhanced version, called 89a, that added support for multiple images in a stream, interlacing and storage of application-specific metadata. The two versions can be distinguished by looking at the first six bytes of the file, which, when interpreted as ASCII, read "GIF87a" and "GIF89a", respectively.
GIF was one of the first two image formats commonly used on Web sites, the other being the black and white XBM. JPEG came later with the Mosaic browser.
The GIF89a feature of storing multiple images in one file, accompanied by control data, is used extensively on the web to produce simple animations. The optional interlacing feature, which stored image scan lines out of order in such a fashion that even a partially downloaded image was somewhat recognizable, also helped GIF's popularity, as a user could abort the download if it was not what was required.
-
GIFs are suitable for sharp-edged line art (such as logos) with a limited number of colors. This takes advantage of the format's lossless compression which preserves very sharp edges (in contrast to JPEG).
-
GIFs can also be used to store low-color sprite data for games.
-
GIFs are used for small animations and low-resolution film clips.
-
In view of the limitation on the GIF formation to 256 colors, JPEG is a more commonly used format for digital photographs. JPEGs can save information on more than 16 million different colors and use more aggressive lossy compression which has a less noticeable effect on photographs than it does on images with sharp edges.
-
The PNG format is becoming an increasingly popular replacement for GIF images since it uses better compression techniques and does not have a limit of 256 colors, but PNGs do not support animations. The MNG and APNG formats, both derived from PNG, support animations but aren't widely used.
Source: en.wikipedia.org