Re: Transparent gif design on the PC

Greg Stumph ([email protected])
Fri, 27 Jan 1995 21:22:55 +0100


IAN KALLEN writes:
> > On Wed, 25 Jan 1995, Kevin Buttler wrote:
> >
> > >
> > > Text item: Transparent gif design on the PC
> > >
> > > Anybody out there know of any programs for the PC where I can make
the
> > > background transparent.
> > > There is a program available at
> > > http://melmac.corp.harris.com/transparent_images.html
called
> > > giftrans that I tried to use to no avail. I'm trying to find
something
> I
> > > can use with Photoshop 3.0....any
> > > ideas?
> > >
> > > Thanks!
> > > [email protected]
> Yea, I was unable to get that 'giftrans' thang to work as marqueed.

After a little trial and error, I've been able to use giftrans without too
much trouble. I use a couple of DOS batch files to make it a little easier,
though. The first one, GIFINFO.BAT, creates a text dump of a gif file and
loads it up in the DOS editor. Here it is:
-------------cut here----------------
@echo off
if "%1" == "" goto error
giftrans -L -e out.txt %1
edit out.txt
del out.txt
goto done

:error
echo Usage:
echo gifinfo filename.gif
pause

:done
-------------cut here----------------

The other batch file is TRANS.BAT. It accepts an input filename, an output
filename, and a color index:
-------------cut here----------------
@echo off
if "%1" == "" goto error
if "%2" == "" goto error
if "%3" == "" goto error

giftrans -T -b %3 -o %2 %1
goto done

:error
echo Usage:
echo trans source.gif output.gif colorNumber
pause

:done
-------------cut here----------------

The procedure for creating a transparent gif file is as follows:

- Use GIFINFO to locate the color index that you want to make transparent.
For example, if you want to make the RGB color 192,192,192 transparent,
you'd find the line in the gif "Global Color Table" that looks like this:
Color XX: Red 192, Green 192, Blue 192, #c0c0c0
The color index of this color is XX.

- Use TRANS to create the transparent gif. Here's an example:
trans in.gif out.gif XX

Greg Stumph
[email protected]