The Graphics Interchange Format or GIF is a bitmap image format that was established by CompuServe in 1987 and has since then been used greatly on the World Wide Web because of its wide support and flexibility.
The format currently supports as much as 8 bits per pixel, which ultimately allows a single image to reference a palette of up to 256 distinct colours selected from the 24-bit RGB colour space. It also has animation capabilities and provides a separate palette of 256 colours for each individual frame. The colour restriction makes the GIF format inappropriate for the reproduction of colour photographs and other images with continuous colour. It works best with simpler images such as graphics or logos with solid, consistent portions of colour.
GIF images are compressed using the Lempel-Ziv-Welch or LZW lossless data compression technique to decrease the file size without lessening the overall visual quality. This particular compression technique was patented in the year 1985. The controversy that manifested as a result of discrepancies in the licensing agreement between the patent holder, Unisys, and CompuServe in 1994 triggered the development of the Portable Network Graphics or PNG standard. Since that time all the associated patents have expired.
CompuServe created the GIF format in 1987 to provide a colour image format for their file downloading areas. It ultimately replaced their earlier run-length encoding or RLE format, which was limited to black and white formatting only. GIF became increasingly popular because it used LZW data compression, which was far more useful than the run-length encoding that formats like PCX and MacPaint used. This meant that fairly large images could hence be downloaded in a relatively short time, even with extraordinarily slow modems.
The first version of the GIF format was deemed 87a. In 1989, CompuServe developed an improved version that was called 89a. It added support for multiple images in a stream, interlacing and storage of application-specific metadata. The two versions can be differentiated by viewing the first six bytes of the file considered the “magic number” or “signature”. When interpreted as ASCII, they will be identifiable by the terms “GIF87a” and “GIF89a”.
GIF was one of the first two image formats generally utilized on Web sites, the other was the black and white XBM. The JPEG image format would not be used until later along with the Mosaic browser.
The GIF89a primary feature of storing multiple images in one file, in association with control data, is utilized greatly on the Web to create simple animations. The interlacing feature which is optional, would store image scan lines out of order in a way that allowed even a partially downloaded image to be somewhat recognizable. This subsequently helped to boost GIF’s popularity, as it meant a user could abort the download if it was not what was needed.
GIF images are suitable for sharp-edged line art including logos with a limited number of colours. This then takes advantage of the format’s lossless compression, which prefers flat areas of consistent colour with well defined edges as opposed to JPEG format, which prefers smooth gradients and softer images.