|
|
GIF (Graphics Interchange Format) Image Format
Format name: Graphics Interchange Format
File extension: .gif GIF stands for "CompuServe Graphics Interchange
Format". It is a
device-independent image format that was developed in 1987 (GIF87a) by
CompuServe for sending bitmap images over low-speed computer networks. In 1989,
the format was modified (GIF89a) to add support for transparency and animation.
G.I.F. uses LZW compression, which is well suited for compressing images with
uniformly colored areas (logos, inscriptions, diagrams, etc.).
The LZW (Lempel–Ziv–Welch) compression algorithm
was developed in 1978 by Lempel and Ziv in Israel, and later improved in the
United States. To compress data, it looks for repeating sequences ("phrases")
throughout the file. Such sequences are saved in a table and assigned shorter
markers ("keys"). Say, if an image contains sets of pink, orange, and green
pixels repeating 50 times, LZW detects them and assigns a specific number (for
example, 7) to such sets, and then saves the data 50 times as number 7. Just
like the RLE algorithm, LZW is most effective when applied to image areas that
are uniformly colored and free from color noise; when compressing arbitrary
graphical data, LZW is much more effective than RLE, though both encoding and
decoding are slower. G.I.F. supports
interlaced images, which makes it possible to display the whole image even if
you have only part of the file, though at a lower image definition. To achieve
this, first are loaded pixel rows 1, 5, 10, etc., then rows 2, 6, 11, etc., and
so on. Little by little, the picture in the browser becomes more and more clear.
In the pre-broadband era, this feature was a huge benefit for users who didn't
need to wait until the whole image file loads if they weren't interested in it
(after taking a quick look at the loading picture). Interlacing slightly
increases file size, but that's a small price for such an advantage.
G.I.F. lets you make one or more colors transparent.
This capability may be used, for example, to make some colors invisible in web
browsers or some other applications. Transparency is achieved by using an
additional alpha channel which is saved in the same file. Moreover, a G.I.F. file
can contain multiple bitmap images, which may be displayed one after another by
a web browser to create the visual effect of movement. G.I.F. animations are still
in widespread use. The G.I.F. format's
main drawback is a limited number of colors: 256 or less. That's far from enough
to achieve printing quality. |
|
|