home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
converters
/
gifpack_1
/
Docs
/
giftrans
< prev
Wrap
Text File
|
1995-03-10
|
2KB
|
57 lines
To create your own transparent gifs the easiest way I have found is to list
the colour map of your gif87, hopefully the transparent colour you want is
black or white so is easy to find as the first or last colour index
white will sometimes look like this
Color 255: Red 247, Green 243, Blue 247, #f7f3f7
and black is usually:
Color 0: Red 0, Green 0, Blue 0, #000000
Examples to generate gif89:
giftrans -t 0 inputgif -o outputgif
giftrans -t #ffffff -o outputgif inputgif
giftrans -b 255 -T inputgif > outputgif
Example to list colour table:
giftrans -L inputgif
The command to generate your GIF with a transparent background should look
something like the examples above. If you piped the output to a file then
change the filetype of outputgif to gif. Using giftrans -L you will see that
the file is now a GIF89a and has a transparent colour index of 255 or
whichever colour index you specified.
The following was generated by 'giftrans -?' in a taskwindow
Usage: giftrans [-t color|-T] [-B color] [-b color] [-g oldcolor=newcolor] [-c comment|-C] [-l|-L|-V] [-o filename] [filename]
Convert any GIF file into a GIF89a, with the folloing changes possible:
-t Specify the transparent color
-T Index of the transparent color is the background color index
-B Specify the transparent color's new value
-b Specify the background color
-g Change a color in the global color table
-c Add a comment
-C Remove old comment
-l Only list the color table
-L Verbose output of GIFs contents
-V Verbose output while converting
-o Pathname of output GIF file
Colors may be specified as index or in the #rrggbb form.
The source code and further information on giftrans can be obtained from
the following two places.
Original distribution site is
ftp://ftp.rz.uni-karlsruhe.de/pub/net/www/tools/giftrans.c
Additional info can be found on
http://melmac.harris-atd.com/transparent_images.html
This version along with source code can be obtained from me at
simon@bigblue.demon.co.uk
or
Simon Truss
23 Charlton Gardens,
Coulsdon
Surrey
CR5 1AS