How can I make transparent and interlaced GIFs? And what are they?

Transparent GIFs are useful because they appear to blend in smoothly with the user's display, even if the user has set a background color that differs from that the developer expected. They do this by assigning one color to be transparent -- if the web browser supports transparency, that color will be replaced by the browser's background color, whatever it may be.

Interlaced GIFs appear first with poor resolution and then improve in resolution until the entire image has arrived, as opposed to arriving linearly from the top row to the bottom row. This is great to get a quick idea of what the entire image will look like while waiting for the rest. This doesn't do much for you if your web browser doesn't support progressive display as the image is downloaded, but non-progressive-display web browsers will still display interlaced GIFs once they have arrived in their entirety.

To create transparent and interlaced GIFs, check out David Koblas' giftool, a program which can manipulate those options and many more aspects of your GIF file.

You can also create transparent and interlaced GIFs using the widely available PBMPLUS tools (also known as netpbm in some incarnations). The following Unix shell script, contributed by Jorg Heitkotter, can make any GIF image transparent if a recent version of the pbmplus utilities has been installed:

#!/bin/sh
giftopnm $1 | ppmtogif -interlace -transparent $2 > /tmp/$$.gif
mv /tmp/$$.gif $1
Make the script executable using the chmod command. Usage is as follows:
transparize <image.gif> <transparent-color>

In addition, there is a document explaining transparent GIFs available at the URL http://melmac.corp.harris.com/transparent_images.html . You can fetch the program giftrans by anonymous ftp from ftp.rz.uni-karlsruhe.de at the path /pub/net/www/tools/giftrans.c.

There is also a Perl Script (URL is: http://www.omron.co.jp:80/~jfriedl/perl/ ) which makes transparent GIFs.

There are also two utilities for the Macintosh, Transparency (URL is: http://www.med.cornell.edu/~giles/projects.html#transparency) and Graphic Converter (can anyone provide a home page or home FTP site for this program?).

A unique approach to the problem is offered by Imagizer (URL is <URL:http://www.minet.com/minet/imagizer.html> ), which transforms your images on the fly when sending them to the user, supporting thumbnails and TIFF-GIF conversion as well as interlacing. (Of course, there is a tradeoff between storage space and CPU usage.)


World Wide Web FAQ