Introduction
GIF was introduced by CompuServe in 1987 (version 87a) and extended in 1989 (version 89a). Each frame holds up to 256 colours from a palette, compressed without loss using LZW. Version 89a added transparency, frame delays and comments, which together made GIF the format for short looping animations on the web.
The LZW patent held by Unisys led to the creation of PNG in the 1990s. The patent expired in 2003 and 2004, and GIF remains widely supported.
Variations
| Format | Variation | About | Open |
|---|---|---|---|
.GIF | Graphics Interchange Format (GIF87a) | The first GIF: palette images on a logical screen, LZW compressed, no extensions. | Open |
.GIF | Graphics Interchange Format (GIF89a) | Palette images of up to 256 colours, LZW compressed, often animated. | Open |
GIF87a
The first version. A file holds a logical screen, an optional global colour table and one or more images, each placed somewhere on the screen with its own optional colour table. It has no transparency, no timing and no comments.
The file starts with GIF87a (47 49 46 38 37 61).
GIF89a
The current version. It keeps the 87a layout and adds extension blocks: the graphic
control extension, which gives a frame its delay, disposal method and transparent
colour, plus comment, plain text and application extensions. Looping animations use
the NETSCAPE2.0 application extension.
The file starts with GIF89a (47 49 46 38 39 61). Many
programs still write GIF87a when a file uses none of the 89a
additions.
Links
Software
- GIMP – free image editor that opens, edits and saves GIFs, including animations as layers (Windows, macOS, Linux)
- Adobe Photoshop – image editor that opens GIFs and exports them, with frames from its timeline (Windows, macOS)
- Photopea – image editor in the browser that opens and saves GIF (web browser)
- Ezgif – online tool for making, cutting and optimising animated GIFs (web browser)
- Gifsicle – command-line tool that edits and optimises GIF animations (Windows, macOS, Linux)
- ImageMagick – command-line tools that convert to and from GIF (Windows, macOS, Linux)
- IrfanView – image viewer that plays and converts GIFs (Windows)
- XnView MP – image viewer and batch converter (Windows, macOS, Linux)
Developers
Reference
- GIF87a specification – CompuServe’s original specification, 1987
- GIF89a specification – CompuServe’s revised specification, 1990