GIF is the oldest image format still in everyday use, published by CompuServe in 1987. A GIF stores a palette of at most 256 colors and one index per pixel, compressed with LZW. That palette limit is the format's main constraint.
A GIF can also hold many frames with a delay between them, which made it the web's only animation format for two decades. That is why animated GIFs are still common, long after 256 colors stopped being enough for photographs.
| Feature | Details |
|---|---|
| Palette | Up to 256 colors, global or per frame |
| Animation | Read and written, with per-frame delays and a repeat count |
| Frame disposal | All three methods, including “restore to background” and “restore to previous”, forwards and when scrubbing backwards |
| Transparency | Read and written: one palette entry marked invisible. On export, partly transparent pixels are dithered to shown-or-hidden |
| Interlacing | Read: the four-pass ordering that makes a picture appear coarse first |
| Export | Still and animated, with the picture reduced to an optimized palette of up to 256 colors, with or without dithering |
These are properties of GIF itself. No program can do better with a .gif file.
| Limitation | Result |
|---|---|
| 256 colors | Photographs are reduced to a palette on export. For full color use PNG, WebP or JPEG |
| Partial transparency | Not representable: a pixel is either fully opaque or fully invisible, so a soft edge becomes a hard one. PNG and WebP keep the soft edge |
| Color profiles | Not carried. The one extension that tried was never registered and nothing reads it, so GIF colors are treated as sRGB — see Color Management |
| Layers | GIF holds flat frames, so export writes the flattened picture |
The picture is reduced to 256 colors on the way out, so flat color, line art and pixel art survive a GIF export unharmed while photographs and gradients do not. Choose Animated GIF to write a document's frames as an animation; Repeat sets how many times it plays, and 0 means forever.
Palette chooses the colors: Adaptive picks the ones that suit the picture, Uniform and Web-safe are fixed evenly spaced sets, Grayscale and Black & White drop the color, and the Macintosh and Windows system palettes match what those classic displays showed. Colors sets how many entries to use, up to 256; fewer make a smaller file. Dithering decides how colors the palette lacks are approximated: Floyd-Steinberg spreads the error into neighboring pixels and looks smoothest, Ordered uses a fixed pattern, None picks the closest color. Transparency keeps transparent areas transparent when the document has any; GIF has one invisible palette entry, so every pixel is either fully shown or fully hidden, and Transparency Dithering sets how partly transparent pixels become one or the other — Ordered or Floyd-Steinberg turn a soft edge into a stipple, None cuts at half. Animated frames with transparency are written so each frame starts from a clear canvas rather than showing the previous frame through.
For anything a GIF would struggle with, animated WebP is the direct replacement: full color instead of 256, real transparency instead of one invisible palette entry, and much smaller files.