From: lsellers <[EMAIL PROTECTED]>



> >
> > I know there are some image-oriented CFX tags and the like out there - but
> > I'm curious if anyone knows of an existing tool/tag that could grab a GIF
> > file, set a certain RGB color within that GIF file to be transparent, and
> > resave the file. Preferably something like a CFX tag that I can
> > trigger once
> > the process to generate the GIF in question has finished.
> 
> Been a while since I studied gif formats, but as I recall the 89a headers
> transparency was indicated by a single byte in the image header (an index
> into the color map). You could probably just read through the colormap data,
> find the closet matching RGB, then change that one byte.
> 

That single byte flag is in an extension block and points to a transparency
index which influences the various color tables.  Gif format is wonderful
for never being the same from one image to another. All the blocks, tables
and indexes may or may not exist at the whim of the file writer. You
really have to drill through the block hierarchy just to find out what is
part of thisImage's structure. Once the map has been surveyed it is trivial
to flip bits, less trivial to insert indexes and tables and blocks. There are
bytes all over that count how many bytes are in other blocks and whether
thisBlock or thatBlock exists. Let's not discuss the format for an animated
89a ...  :)

Really good for the ubergeek who likes doing a few mental push-ups just
to keep in top form.

Pan

p.s.
 .pdf files are also covered by the Unisys LZW patent - hmmmmm...
 .png is the only future we have




------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to