GIF description

GIF at a Glance

Stands for
Graphics Interchange Format
File extension
Bob Berry and team at Compuserve
1987, updated in 1989
Filespec free and open release by Compuserve
Maximum Colors
indexed transparency (each pixel can be fully transparent or not transparent)
Optional Goodies
Interlaced GIFs
Mostly a leftover from the days of slow
connections. Image appears gradually on the screen.
Animated GIFs
An animated GIF consists of several GIF frames that share the same palette.
Lossless – LZW (Abraham Lempel, Jacob Ziv, Terry Welch), RLE
How it works
Uses a palette, and instead of putting 24-bit values in its map
for the image, it puts palette values. So it starts off with 3:1
compression. The LZW compression on top of that can raise it to
5:1 or even 10:1.

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.

GIF Is Good For

1. Line drawings and clip art

The largest palette a GIF image can have is 256 colors. When
you have a transparent color, that knocks it down to 255. If you start putting a lot of colors
into your image, pretty soon your graphics program is going to
run out of palette space. The first thing you’ll notice
will not be colors that look wrong.

2. CAD drawings
3. Text

Normally you’ll create an image of text using your graphics
program’s text tool. We have a little advice from experience:

  • Make your text as close as you can to the size it’s going to
    appear on your web page. Changing the point size in your text tool
    will often give you smoother characters than changing the size of
    the image later on. When you set the character down, your graphics
    program will perform a smoothing step. If you resize it later on,
    it may not recognize that what you originally had was a black
    diagonal line. All it’ll see is the values of the pixels, and
    sometimes the result of smoothing followed by resizing
    won’t be as smooth as getting the size right the first time.
    Some graphics programs support vector text objects, which lets you
    get pretty much the same result.
  • Almost every graphics program’s text tool will let you
    choose in-between values for font size. For example, if the
    drop-down menu shows 48 points and 60 points, you can type
    in 51 points or 63 points.
  • You don’t need to install all the fonts you use. Open up a
    font you’ve downloaded from Windows Explorer or in a font browsing
    tool, and it’ll magically appear on the list of fonts in your
    graphics program’s text tool.

4. Animations
(if you absolutely have to). No equivalent in PNG or JPEG.
GIF animations are now deprecated. They have been widelly used proffesionally for commercial banners in the nineteens, and often (unprofessionally) for crappy animated characters.

GIF Is Bad For

1. Photographs
2. Images with more than 256 colors

GIF in the News

Some years after the GIF format had become widespread, Unisys
announced that they owned a patent that covered some of the
compression technology used to make GIFs. That was one of the
factors that led to the development of the PNG file format. Later
on, when Unisys started enforcing their patent by requiring a fee
from people who made graphics programs that created gifs, there was
a boycott of GIFs on the Web. The patent expired in the US in June
2003, but it’s still active in some countries. Most web sites that
changed over to PNG are keeping the PNGs because PNGs are a
superior (smaller) format, and other sites continue to convert to
PNGs and publish new images as PNGs.

This article is a modified version of the one found at: with necessary corrections and improvements

Posted in Optimization Tips

Leave a Reply

Your email address will not be published. Required fields are marked *