Posted: December 2006
Related Projects @mikekohn.net
GIF and LZW Compression/Decompression
Here is a library I made for compressing/decompression GIF images. I'm releasing this library under LGPL. Should be pretty easy to use and I've included some sample programs include a pretty fast cropping program. This library can compress/decompress to/from memory and supports gif89a transparency.
For a partial explanation of LZW click
gif_crop, gif2ascii, gif2html
I included 3 sample programs that use libkohn_gif. One will crop gifs, another will turn a gif into ascii art, and the third will turn the gif into an html table.
An example of an image run through the gif2html can be seen here:
Update (January 20, 2012): For some reason I had some global variables in the original code. I took them out so multiple decompression/compression could be done at the same time. I also refactored some memory allocation so multiple malloc()'s become just 1. I also improved the performance a bit.
Downloadslibkohn_gif-2012-01-20.tar.gz (Source Code)
libkohn_gif-2012-01-20.zip (Windows DLL)
libkohn_gif-2009-01-27.tar.gz (Source Code)
libkohn_gif-2009-01-27.zip (Windows DLL)
The following is an lzw compressor/decompressor with no GIF headers
and such. I wrote it for a proof of concept for a future project.
Copyright 1997-2021 - Michael Kohn