GIF Files & Palettes


Image Description

The Non-Dithering 216
Color WEB palette?



The WEB palette is known as a non-dithering palette, and it will produce non-dithered images when deployed in the creation of graphics. There are times when this WEB palette will better represent an image when it is allowed to dither.

This is a top-down gradation saved as an 80% "GOOD" JPEG file which saves with an full (24 bit) palette. On a computer capable of displaying 16 or 24 bit color this image will look about as much like the original as possible. The color match should be quite good.

575 bytes in size.

This is the top-down gradation run through an adaptive palette, dithered, chosing the very best 256 colors, then saving as a GIF image.

3,725 bytes in size - palette shown below

Given a choice, The gradation shown in the upper left cell would best be compressed using a JPEG compression. But, if this kind of gradation is to be used in a WEB background (which can only be a GIF), or in the background of an animation, then it must be compressed using the GIF format.

So what is the best method to represent a gradation using the GIF format?


1.) The Top-Down gradation was run through the WEB palette, with Dithering ON. The palette resulted in using 12 colors from the WEB palettes' 216 available.

2,978 bytes - palette shown below

This is the standard 216 color WEB palette. When it is used to resample an image in
a program like PhotoShop, it can be done with dithering ON ,or with dithering OFF. Although the WEB palette is known as a "non-dithering" palette, the colors can be dithered when the palette is applied to a gradation.

In the first WEB palette image to the left (1.), dithering was turned on, and the final palette contained 12 colors from the 216 possible. The image still resembles the original top-down gradation, and is not substantially wos than the adaptive palette shown above it.

In the second image (2.), dithering was turned OFF, and the resultant palette contined onl y 7 colors. Here the Top-Down continuous gradation has been convrted into 7 bars of color with indistinct edges. A poor representation of the original image. It is much smaller in size, but it has lost most of the orignals feel.

In this last cell (3.), the dithered image (located two cells above it(1.)), was resampled down to only 8 colors (3 bit). The resultant GIF file was reduced in size by about 600 bytes while retaining much of the Top-Down gradation.

2.) The Top-Down gradation was run through the WEB palette, with NO dithering, and the palette resulted in using only 7 of the WEB palettes 216 coors.

563 bytes Resultant palette shown below

3.) Here the image created above with an oringal palette of 12 colors was then resampled to 3 bit (8 colors). Dithering was still ON, only the number of colors was reduced. It also reduced the size of file.

2,339 bytes - palette shown below.

Menu Bar

Take home lesson about GIF files:

Generally continuous tone documents (like photos) should be handled by jpeg compresison, but when GIF is selected as the desired method; sample the continuous tone document with the WEB palette, and turn dithering ON. If the image is sampled with dithering OFF, the resultant image will be highly posterized, and wil not provide an accurate result.