IntroWebGraphics.png (35161 bytes)

Optimizing Gif File Compression

Gif files use LZW file compression which is a "lossless" compression.  This means the image stays true when compressed.  GIFs compress by looking for repeating patterns of color along each horizontal line and compressing the pixels.  As the GIF scans across the image horizontally, wherever there are adjacent pixels the same they are compressed together. Therefore the images that get compressed the most contain the most repeating patterns along the horizontal.

Lines running horizontally causes more compact files.  For example the full size version of this picture is 3209 bytes.                     ===>

LinesH.gif (3208 bytes)

LinesV.gif (7994 bytes)

<=== The same full-sized  image rotated 90 degrees takes up 7994 bytes.   The horizontal thumbnail version above takes up 1498 bytes, while the vertical thumbnail  takes 2249 bytes.

 

     

Last updated on 02/11/2003  by L.M. Hicks