GIF Image Files

The GIF (Graphic Interchange Format) was created in the 1980's by Compuserve to transmit images across their nascent network.

GIF files usually have the .gif suffix.

It is now one of two standard image file formats found on the web.

In fact, the graphics on this page are GIF files:

That fancy little bullet back there at the beginning of this sentence is a GIF image.

This line:

And the background image is a GIF

GIF file size

Way back in the 80's (gulp) when GIF was born, people were often connected to the network at what now seem like incredibly slow speeds... like 1200 baud (bits per second).

[ Note: it seemed incredibly slow back then too! ]

Therefore file size was of the utmost concern for GIF designers:

All GIF files automatically compress themselves
you don't have to ask for it 
and you don't have any control
The compression is loss-less... there is no degradation of the quality of the image during compression
GIF files only support up to 256 different colors per file... 
you choose which 256 colors however
you can choose the 216 web-safe color palette if you like
most image and picture editors have nice algorithms to reduce the colors in an image to <= 256 for you
Technical factoid: GIF compression works best on images with larger areas of the same color... a side effect of the kind of compression (LZW) used in GIF

Example

A map of the area around the Naperville Metra train station

The Naperville Metra train station

Iamge dimensions: 400x378; Image size: 42KB

This image is a great example of what GIF loves.

Not too many colors

Straight lines are easy for GIF to compress

Special Features

A couple of special features were slipped into the definition of GIF files that are sometimes useful:

  1. Transparent color - you can identify one color index to be "transparent"

  2. Animation - GIF can do crude animation for things like icons or banners

  3. Interlacing  - rather than loading the image top-down, you can tell your GIF file to load the entire image ASAP and sharpen it as it loads... maybe you've seen this on the web

Pros and Cons

Gif files are great for:

Cartoon-like drawings
Clip art
Accessory web graphics (wallpaper, bullets, lines, etc)

GIF files usually aren't the best choice for:

Photos
Detailed drawings

 

 

Next page