RE: Compression

by "The Wise One!!!" <cardpro(at)zebra.net>

 Date:  Wed, 22 Jul 1998 01:39:07 -0500
 To:  "Claus Cyrny" <ccyrny(at)stuttgart.netsurf.de>
 Cc:  "Peter Eklund" <peklund(at)metrolink.net>, "Hwg-Graphics@Hwg. Org" <hwg-graphics(at)hwg.org>
 In-Reply-To:  netsurf
  todo: View Thread, Original
[snip]

> The compression algorithm in GIF doesn't remove anything, since
> GIF (like PNG) isa lossless format. It builds a code table of
> the image data and then compresses the
> image. When decompressing this code table has to be computed
> again, since it
> is not being stored with the  compressed image data.
>
> HTH,
>
> Claus

You miss the point Claus. To "compress" a GIF file, you reduce color depth.
Once you have reduced that color depth, the information on the *removed*
colors is effectively gone from the image. There is no way to get them back.

Certainly you can go back with a graphics program and *increase* the color
depth, but you will not improve the appearance of the image by doing so.

So, yes, the GIF format is by definition "lossless", but it is only
"lossless" for the information already stored in the file. The compressed
data (i.e. reduced colors) is gone.

Alan S. Atwood

HWG: hwg-graphics mailing list archives, maintained by Webmasters @ IWA