Transparent Colors for use in HTML Files


This program allows you to make a color in a GIF picture transparent when viewed in WWW browsers.

Below is given an example of how to make the background color of a gif image transparent when viewed in a WWW browser.

Step 1

Create an image with a single unique background color.

Step 2

Use xv to edit the colormap and change the background color to some color that blends well with the WWW browser's background. Not all browsers support transparent colors.

To edit the color map select the ColEdit button in xv.

Select the color you want to edit by clicking on the picture with the left mouse button on the color you want to change. This will highlight the color entry in the colormap.

Move the Red, Green, and Blue values to achieve the color you desire. Values that blend well on the Sun version of Mosaic are 191 for all color values.

Here a values other than 191 were chosen for example.

Step 3

Find the index of the color you wish to change in the colormap by looking at the ColEdit option. The index starts at 0 in the upper left and goes from left to right. In this example the color to be changed has index 0 in the color map.

Step 4

Use the giftrans program to make that color in the colormap transparent. The syntax for the command is:
giftrans -t index < input.gif > output.gif





Comments to: webmaster@dca.fee.unicamp.br
Revised: April 9, 1996
URL: http://www.dca.fee.unicamp.br/sysadmin/helpstuff/giftrans/
Copyright © 1996 - DCA