GIF is a file format that is meant for use on the internet. It should not really be used for prepress. Unfortunately, GIF images keep popping up in pages made by amateurs so it is worthwhile to know a bit about the format. You can also use this description to explain to people why GIF is not suited for prepress use.
GIF is the abbreviation of Graphics Interchange Format. It was originally developed by CompuServe (an on-line service that was pretty successful in the early nineties). The format includes some key features which make it a unique and valuable format for the internet. These features include file compression, transparency, interlacing and storage of multiple images within a single file which allows for a primitive form of animation.
There are two versions of the GIF format; versions 87a and 89a. These versions were released in 1987 and 1989 respectively.
- GIF 87a: the initial version of the GIF file format supported LZW file compression, interlacing, 256-color palettes and multiple image storage.
- Version 89a added background transparency and a few other additions such as delay times and image replacement parameters to make the multiple image storage feature more useful for animation.
Because the LZW compression algorithm that is used in GIF is copyright protected, a new standard has been developed, based on a free compression algorithm. This successor, called PNG, has basically replaced GIF except when GIFs animation features are useful.
Features of the GIF format
This is an overview of the different features of the GIF file format, from the perspective of a prepress operator.
Limited color palette
A GIF image can contain 2, 4, 8, 16, 32, 64, 128 or 256 colors which are stored in a color palette or color lookup table within the image file. Each color in the GIF color table is described in RGB values, with each value having a range of 0 to 255. CMYK colors are not possible in GIF. Although the GIF format has access to over 16.8 million colors, only a maximum of 256 can be referenced within a single GIF image. While this limited palette keeps down file size and is perfectly acceptable for on-screen viewing, it leads to posterized images when they are printed. Most preflight tools like PitStop can generate a warning when they encounter images with a fixed color palette.
The limited number of colors in GIF is used to limit the file size of images. While a small image using 256 colors may take up 9.5 K, the same image using 32 colors takes up only 4.4 K and going down to 16 colors get it down to 1.9 K. Another trick that is used to limit the file size is dithering. This technique is used to create the illusion of greater color depth by blending a smaller number of colored ‘dots’ together. When fewer colors are able to be displayed than are present in the original image, then patterns of adjacent pixels are used to simulate the appearance of the underrepresented colors. Dithering is not really a feature of GIF, it is simply a technique that is often used within GIF images. Dithering adds noise to the image and it reduces sharpness.
GIF supports LZW compression, which is a lossless compression algorithm that is also used frequently in prepress. TIFF images, for example, are also often LZW compressed.
Transparency is the feature of the GIF89a format which allows for the specification of one of the colors in the palette to be ignored while processing the image for your display device. While this feature works great on the internet, it is not supported by layout applications, which rely on PSD-files or EPS-images with an included mask to achieve the same functionality (but with a much smoother edge around images).
Interlacing is another web-specific feature of GIF. It is a mechanism that makes images appear faster on-screen by first displaying a low-res version of the image and gradually showing the full version. Physically, an interlaced GIF just has the scanlines stored in an unusual order:
- The first pass has pixel rows 1, 9, 17, etc (every eighth row)
- The second pass has rows 5, 13, 21, etc. (every remaining fourth row)
- The third pass has rows 3, 7, 11, 15, etc. (every remaining odd row)
- The last pass has rows 2, 4, 6, etc. (all the even-numbered rows).
How the web browser chooses to display this is up to the browser. This feature cannot be used by prepress software.
The GIF89a specifications add a few enhancements to the file header which allows browsers such as Netscape to display multiple GIF images in a timed and/or looped sequence. This mechanism allows for small, rather crude animations and it is a very popular feature that used often used in banners. This feature is of no use for prepress software.
Although GIF does not require a specific resolution, most GIF images have a resolution between 72 and 90 dpi, ideal for on-screen viewing but insufficient for prepress use.
Release date: 1987
Type of data: bitmap
Number of colors: 2, 4, 8, 16, 32, 64, 128 or 256
Color spaces: RGB
Compression algorithms: LZW
Ideal use: internet publishing
Extension on PC-platform: .gif
Macintosh file type: ?
Special features: support for transparency, interlacing, and animation