GIF Compression

The Graphics Interchange Format© is a format for image files. Although better formats are available, GIFsm is still the de facto standard for many web graphics. It actually does a good job for graphics like (small) buttons and panels. For images of photographic nature, the JPEG format is better suited. The reason for this distinction is that the JPEG format uses a so-called lossy compression scheme, which means that an image compressed with JPEG does not hold all details of the original image. Depending on the quality setting (which is adjustable), a trade-off can be made between compactness of the resulting file and faithfulness to the original. Due to the nature of the compression algorithm, JPEG is not particularly good at compressing graphics of "artificial" origin containing text, sharp edges, line art, etc., such as web buttons or business graphics.

The GIF format, on the contrary, offers lossless compression. Due to its algorithm, GIF is best at compressing areas of (exactly) the same color (which hardly ever occur in photographic images). A drawback of the GIF format is that it is limited to a palette of 256 colors. To achieve better-looking results, you can use a technique called dithering, in which the inability of the human eye to exactly resolve adjacent pixels is taken advantage of to create the illusion of mixed colors (for example using Becasso's Quantize add-on). For even better results, the palette used for the quantization can be matched to best represent the colors used in the image by using Becasso's Edit > Extract Palette... option.

The Unisys Patent

Unfortunately, the algorithm used for compression in GIF files (the so-called LZW algorithm) is covered by a patent held by Unisys. This means distributing software that uses this algorithm is charged on a per-copy basis.

Because of this, the GIF Translator by Sum Software avoids the use of the LZW algorithm, exploiting a feature of the GIF format that allows exporting uncompressed files. This way, the GIF Translator can be kept free. The drawback, obviously, is larger files, which can be a rather important factor for web graphics.

Third Party Compression Services

Since the patent only covers the software using the algorithm and not the resulting image files themselves, nothing prevents you from loading the uncompressed GIF files into a commercial application that does license the algoritm, and writing them out again as compressed GIFs.

An interesting opportunity to compress your GIF files is the online compression service of GIF Wizard. You can specify a web site for them to check and recompress all GIF (and JPEG) files on it, or have them compress single files.

GIF Wizard Free Site Survey!

Since the BeOS comes with a simple web server, called PoorMan, it is quite easy to use GIF Wizard:


This documentation is © 2000, Sum Software.
Last modification: 2 September 2000.
Be and BeOS are registered trademarks of Be, Incorporated. GIF is a Service Mark property of CompuServe Incorporated. All other trademarks used herein belong to their respective owners.