[Coco] GIF
Roger Taylor
rtaylor at bayou.com
Fri Dec 19 14:54:47 EST 2003
At 01:41 PM 12/19/2003 -0500, you wrote:
> >Roger Taylor sent me some GIF docs (thanks again), but some key info
> > at the bit level is missing. GIF also uses complex compression
> > schemes, so probably BMP is our best hope. I've done a little bit
> > of Hex dumping of simple BMPs, but haven't gotten far with reverse
> > engineering them yet. --Mike K.
I will be glad to give a tutorial on how to decode or encode GIFs so I can
get my mind of these crazy web server issues.
The only part of the file that is complex is the LZW agorithm, and even it
is quite simple once you visualize how it works.
A quick visual of a compressed stream of colors would be similar to a
tokenized BASIC program, only everything is tokenized, not just
commands. Some tokens point to other tokens, that also point to other
tokens, etc. When you expand a token back, you have to follow the chain of
pointers and follow it down to a base color, while also collecting the
color that is assigned to each token. You're basically dealing with a
table full of pointer/color pairs. Each LZW code can lead to any number of
other code/colors until the "string" ends when you encounter a code that is
below the base-code value, which is slightly above the maximum colors
possible in the picture.
That's a starter.
----------
Roger Taylor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://five.pairlist.net/pipermail/coco/attachments/20031219/18bbfba1/attachment-0001.html>
More information about the Coco
mailing list