GIF

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.

The format was introduced in 1987 by CompuServe in order to provide a colour image format for their file downloading areas, replacing their earlier RLE format which was black and white only. 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 could abort the download if it was not what was required.

GIF images are limited to 256 colours, though it is possible to hack around this limitation, under certain circumstances, using the animation feature (see colour).

English speakers often pronounce "GIF" with either an affricate as in "giraffe" /dʒɪf/ or a plosive as in "gift" /gɪf/. The format's creators are quoted as using an affricate to pronounce the acronym. There is plenty of evidence to suggest this, much of which can be found here (http://www.olsenhome.com/gif/). However, many people use the plosive pronunciation in daily conversation. The affricate was used as the developers had a sense of humour "Choosy Developers Choose GIF", making a play on a then-famous commercial for peanut butter. Outside of the English language there are a number of further variants.

Contents

History

The original version of GIF was 87a. In 1989, CompuServe devised an enhanced version, called 89a [1] (http://www.w3.org/Graphics/GIF/spec-gif89a.txt), that added support for multiple images in a stream, interlacing 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 gained popularity, GIF became one of the two image formats commonly used on Web sites, the other being JPEG. Most internet browsers at this time did not support any other image formats, not even uncompressed Windows bitmap files, to discourage web designers from using files larger than necessary.

The GIF89a feature of storing multiple images in one file, accompanied by control data, is used extensively on the web to produce simple animations.

Unisys and LZW patent enforcement

Missing image
Burn_All_GIFs.png
One of the "Burn All GIFs" graphics (http://burnallgifs.org/archives/images/)

The LZW compression algorithm on which GIF is based, was covered by Template:US patent owned by Unisys. When Compuserve first developed the GIF they did not know that LZW was covered by a patent.

Before 1994, Unisys was not aware that GIF used LZW. In December 1994, after Unisys discovered that GIF used the LZW, they announced that they would be seeking royalties on that patent; 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. The desire for a format with fewer legal restrictions (as well as fewer technical restrictions such as the number of colours) led to the development of the PNG format, which has become the third most 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.

On June 20, 2003, the United States patent on the LZW algorithm expired [2] (http://www.unisys.com/about__unisys/lzw), which means that Unisys and Compuserve can no longer collect royalties for use of the GIF format in that country. Those bothered with the patent enforcement dubbed this day GIF Liberation Day. The equivalent patents in Europe and Japan expired on June 18 and June 20 2004 respectively, with the Canada patent following on July 7.

IBM has also patented the LZW algorithm, but has never enforced this patent. According to the Free Software Foundation that patent will expire on August 11 2006 in the United States.

Usage

Missing image
Mashimaro.gif
An animation of Mashimaro

Even with the general adoption of broadband, the size of downloads continues to be a critical issue on the world wide web. Large web pages have a negative effect on user experience by being slow to render. Large web pages are also more expensive for their owners who pay by the megabyte once traffic has passed a certain level. Therefore GIF's compression makes it desirable as an image format for use on webpages.

GIF is the only widely used image format to support animation. It is frequently used to make small animations and short, low-resolution films for web pages.

Most web page logos and design element images are GIF or PNG because those are designed to successfully compress images that contain large blocks of the same colour or of repeating patterns; JPEG cannot compress areas of flat, clean colour well.

JPEG is preferred for digital photographs because it allows images to contain more than 16 million different colours (GIF gives a choice of only 256 of those colours per image) and it compresses photographs better. Uncompressed bitmap formats like Windows bitmap are sometimes preferred for images in computer software when speed is more important than reduced file size, because uncompressed bitmaps can be displayed more quickly.

Colour

GIF is palette based: although any colour can be one of millions of shades, the maximum number of colours available for each frame is 256, which are stored in a "palette", a table which associates each colour number with an actual colour value. The limitation to 256 colours seemed reasonable at the time of GIF's creation because few people had the hardware to display more. Simple graphics, line drawings, cartoons, and grayscale photographs typically need fewer than 256 colours. Optionally, one of the colours in the palette can be set as transparent, hence achieving simple binary transparency.

There exist ways to dither colour photographs by alternating pixels of similar colour to approximate an in-between colour, but this transformation inevitably loses some detail, and the algorithms to select colours and to perform the dithering vary widely in output quality, giving dithering a possibly unwarranted bad reputation. Additionally, dithering significantly reduces the image's compressibility and thus works contrary to GIF's main purpose.

GIF89a was designed based on the principle of rendering images to a logical screen. Each image could optionally have its own palette, and it was up to the tool producing the gif whether to put any delay between them. This is the feature that is used to create animated GIFs, but it can also be used to losslessly store a 24-bit RGB (truecolour) image by splitting it up into pieces small enough to be encoded into a 256 colour palette and setting up the gif to render these with no delay on the logical screen. Unfortunately, most web browsers seem to assume that this multi-image feature will only be used for animation and insert a minimum delay between images. There will be some filesize bloat from doing this, especially if the encoder doesn't support LZW for patent reasons. There are very few tools around that can easily produce truecolor GIFs, and it is rarely an appropriate format unless there is absolutely no other option. (demo (http://phil.ipal.org/tc.html))

Alternatives

The PNG format was specifically designed to replace GIF for use as a single-image web format. PNG offers better compression and more features than GIF. The format is rapidly replacing 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.

All the features of GIF except animation are supported by PNG. As new web browsers support PNG, most GIF images could be replaced by PNG images. The most recent versions of Internet Explorer for windows, however, do not support PNG's 8-bit alpha transparency through the normal img tag, a feature absent from GIF images which only provides 1-bit transparency, that is, pixels are either fully transparent or fully opaque. This is not a problem with many other web browsers. Version 7 of the browser, however, will finally support this missing feature [3] (http://blogs.msdn.com/ie/archive/2005/04/22/410963.aspx).

The mistaken belief that PNG files are larger than GIF for the same images can generally be traced back to one of two things:

  • People making the unfair comparison of the file size of 8 bit GIF with 24 bit PNG.
  • The poor PNG support in older versions of Adobe Photoshop.

MNG, the animation-supporting relative of PNG, reached version 1.0 in 2001, but few applications support it. It has therefore had little impact on the use of GIFs for animation. Today animations may be the only field where GIF is needed, because of the lack of web browser support for MNG.

In 2004, a proposed extension to the PNG format, called APNG was suggested. It would add the ability to animate PNG files, while retaining backwards compatibility in decoders which cannot understand the animation chunk. Such decoders would simply display it as though it were a single image PNG file.

Miscellaneous

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

See also

External links

de:Graphics Interchange Format es:GIF fr:Graphics Interchange Format it:Graphics Interchange Format nl:Graphics Interchange Format ja:Graphics Interchange Format pl:GIF pt:Graphics Interchange Format ru:GIF sl:GIF sv:GIF zh:GIF

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools