[HTML] [Images]

Line Art

Gif is very efficient for line art or poster work where there are large areas of flat colour, black or white. If we convert the colour pictures of the Polly Woodside to black and white, we notice a tiny decrease in file size for gif and a moderate decrease for jpg; the black and white images still have 256 grey-scale levels after all. Converting them into artificial line-art by edge-detection and thresholding the grey-scale level at a suitable value we get a large decrease in file size for gif and an increase for 75% jpg:

320x320 Images (Polly Woodside)

gif, 56K

jpg 75%, 20K

gif, 5K

jpg 75%, 30K
line art
gif 3K
Of course the last two images above are not of acceptable quality for an HTML page about the ship; they are only given as examples of artificial line drawings to illustrate gif's efficiency in that kind of application. Genuine line art (and I only claim the "line", not the "art") typically has far less detail and thus gives even smaller file sizes in gif format: 3K (left).

The efficiency of gif for line art and poster art comes from two factors. Firstly, fewer bits are needed to state the number of a colour table entry: 1 bit per pixel for 2-colour images, 2 bits per pixel for 4-colour images, etc. Secondly, this kind of image has large runs of flat colour and these runs compress well under the gif model.

[Images]


Copyright © L.Allison Department of Computer Science, Monash University, Australia 3168 / 1997