The GIF file format
GIF is a file format that should not really be used for prepress, it is far more suited for web design or to exchange images through e-mail or newsgroups. Unfortunately, GIF images keep popping up in pages made by amateurs (not to mention books about the internet
) 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.
General information
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 makes 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-colour palettes and multiple image storage.
- Version 89a added background transparency and a few other additions such as delay times and image replacement parameters which made 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, is already supported by modern browsers but it still has not achieved the popularity of GIF.
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 preflighting tools like PitStop can generate a warning when they encounter images with a fixed color palette.
Dithering
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.
LZW compression
GIF supports LZW compression, which is a lossless compression algorithms that is also used frequently in prepress (TIFF images are also often compressed using LZW).
Transparency
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
Interlacing is another web-specific feature of GIF. It is a mechanism that makes images appear faster on-screen by first displaying a lowres 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.
Animation
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.
Resolution
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.
Specsheet
Name: GIF
Developer: CompuServe
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
Remarks: -
Your articles helped a lot finishing my college assignment. I’m grateful to you guys..
Thanks a lot!
Cheers!
I received three pictures in an email…one had a .jpg extention and the other two a .gif extention…the .jpg file opened and I can not get the .gif files to open to see the pictures….what do I do……step by step please……..lol
Mr.newbie,
gif file might have been corrupted.
What is the application in which you tried to open it?
Windows Picture and Fax viewer,
Microsoft Photo Editor,
MS Paint,
Adobe Photoshop,
ImageReady…..?
What is actually happening while opening it?
hi I need gif on my pc but I don’t know how to get it? please help
GIF is a file format, not an application. Maybe it was an illusion to think that this page made that clear.
Thanks , This information helps me alot
thank you
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
Thank you for all the information, really helpfull, you can also use some videos to for better understanding of concepts. good work done!
really good information’s delivered,.. this has helped me know more about GIF file format. thank you a lot
Hi…
I just completed a retouching job of a model’s face and want to create a .gif file of ‘before’ and ‘after’.
However, when I look at the resulting image (shrunk to about 800 x 600), the ‘after’ image shows some ugly graininess, almost like “droplets” all around the face of a model, pretty much nullifying all my work.
Can someone explain to me what (if anything) could be done to remedy the situation and what settings or whatever I should use, since at present this .gif is absolutely unacceptable.
Thanx.