GIF Color Depth, Transparency, and Interleaving

The original image in JPEG format--448x298 pixels, 256 colors, 19k file:

JPEG beetle

After changing format to GIF, the file size increased to 40k:

GIF format beetle.

Reducing the size of the image to 250x166 pixels reduces the size of the file to 14k and changing the color (bit) depth from 256 to 16 reduces the size further, to only 4k (though it looks pretty crummy!).

256-color GIF. 16-color GIF

If we make the (white) background of this image "transparent" then the background color (or image) will show through. (See example on right.)

256-color GIF Transparent, 256-color GIF

Please note: to get transparent backgrounds, you must use GIF89a and not GIF87a. (89a was announced in 1989 and 87a in 1987.) Also, transparency does not affect file size.


Pull examples of an interleaved GIF and a progressive JPEG from ??? through this thumbnail beetle.

Thumbnail beetle.