Jump to content

GIF: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
active voice; explain dithering; true-color GIF images; more comparisons vs. PNG; clarified standard status of MNG; more Burn All GIFs info
 
m mention MIME type
Line 19: Line 19:
and fairly large images could therefore be downloaded in a reasonable amount of time,
and fairly large images could therefore be downloaded in a reasonable amount of time,


even with very slow [[modem]]s.
even with very slow [[modem|modems]].


The optional interlacing feature, which stored image scanlines out of order in such a fashion that even a partially downloaded image was somewhat recognizable,
The optional interlacing feature, which stored image scanlines out of order in such a fashion that even a partially downloaded image was somewhat recognizable,


also helped GIF's probability, as a user the could abort the download if it was not what was required.
also helped GIF's popularity, as a user the could abort the download if it was not what was required.




Line 58: Line 58:


when interpreted as [[ASCII]], read "GIF87a" and "GIF89a", respectively.
when interpreted as [[ASCII]], read "GIF87a" and "GIF89a", respectively.








Line 120: Line 116:


older browsers (up to and including early 4.0 releases of) have little or no support for PNG images.
older browsers (up to and including early 4.0 releases of) have little or no support for PNG images.



The [[MIME]] media type for GIF is image/gif (defined in <nowiki>RFC 1341</nowiki>).





Revision as of 13:38, 9 October 2001

GIF (Graphics Interchange Format) is a bitmap

image format that is widely used on the World Wide Web,

both for still images and for animations.

It was introduced in 1987 by CompuServe.

"GIF" is often prounced giff with a hard g (that is, "gift" without the final t),

but the official pronunciation is jiff.


GIF became popular because it used LZW data compression,

which was more efficient than the run-length encoding that formats such as PCX and MacPaint used,

and fairly large images could therefore be downloaded in a reasonable amount of time,

even with very slow modems.

The optional interlacing feature, which stored image scanlines out of order in such a fashion that even a partially downloaded image was somewhat recognizable,

also helped GIF's popularity, as a user the could abort the download if it was not what was required.


Most GIF images can have at most 256 colours,

but when the format first appeared this was not a significant limitation,

as few people had the hardware to display more.

Typical line drawings, cartoons, grayscale photographs, and the like need only 256 colours.

There exist ways to "dither" colour photographs by alternating pixels of similar colours to approximate an in-between colour,

but this transformation inevitably loses some detail, and the algorithms to select colors and to perform the dithering vary widely in output quality,

giving dithering a possibly unwarranted bad reputation.

(A variation using the animation feature to draw each scanline in a separate palette can store any RGB colour out of 16 million,

but this takes even more space than an uncompressed Windows bitmap

and is useful only where lossless true colour is required and the designer cannot count on support for PNG images.)


The original version of GIF was 87a.

In 1989, CompuServe devised an enhanced version, called 89a, that added support for animation and storage of application-specific metadata.

The two versions can be distinguished by looking at the first six

bytes of the file, which,

when interpreted as ASCII, read "GIF87a" and "GIF89a", respectively.


When the World Wide Web took off,

GIF became one of the two image formats commonly used on Web sites,

the other being JPEG File Interchange Format.


At the end of December 1994,

CompuServe and Unisys

announced that the U.S. patent which Unisys holds for the LZW compression algorithm

would be enforced for GIFs:

all commercial programs capable of producing GIF files

would be required to pay a license fee to Unisys.

By this time, GIF was in such widespread use that most companies

producing these programs had little choice but to pay up.

These problems led to the development of the PNG format,

which has become the third common image format on the Web.

In late August 1999, Unisys terminated its royalty-free LZW technology licenses

for free software and non-commercial proprietary software

and even for individual users of unlicensed programs,

prompting the League for Programming Freedom to launch the Burn All GIFs campaign to inform the public of the alternatives.


PNG offers better compression and more features than GIF,

and as of 2001, most popular web browsers support PNG images.

But PNG only slowly began to replace GIF for still images,

mostly on web sites of computer enthusiasts protesting Unisys's license policies

and on some cartoon sites that take advantage of PNG's tighter compression to save on Internet bandwidth charges.

The animation extensions to PNG -- called MNG --

have only recently become a standard, and few applications support MNG.

The primary advantage of GIF over PNG for still images is compatibility:

older browsers (up to and including early 4.0 releases of) have little or no support for PNG images.


The MIME media type for GIF is image/gif (defined in RFC 1341).



External links:

  • Burn All GIFs (http://burnallgifs.org): (slightly biased) information about the ramifications of the LZW patent