GIF
A lossless indexed-color format supporting up to 256 colors with frame animation, widely used for short looping clips.
GIF (Graphics Interchange Format) was developed by CompuServe in 1987. It uses LZW (Lempel-Ziv-Welch) lossless compression with an indexed color model, selecting up to 256 colors from a palette to represent each frame of the image.
It supports multi-frame animation within a single file. Each frame specifies a display duration and disposal method, and browsers render the animation natively without plugins.
- Transparency: One palette entry can be designated as transparent, but partial transparency (alpha blending) is not supported
- Interlacing: A 4-pass progressive display mode improves perceived loading speed on slow connections
- LZW compression: Achieves high efficiency on flat-color images with repetitive patterns
The 256-color limitation makes GIF unsuitable for photographs or smooth gradients, where dithering artifacts become visible. For animation use cases, full-color formats such as WebP and AVIF are also available.