Back to Guide
.gif
Graphics Interchange Format
The Graphics Interchange Format (GIF) is a bitmap image format that supports animations. It uses LZW compression to reduce file size without degrading quality for images with solid colors.
Advertisement
History & Origin
Introduced by CompuServe in 1987 to provide a color image format for their file download areas. It became immensely popular on the early web for its ability to support simple animations.
Internal Structure
A GIF file consists of a header, logical screen descriptor, and a series of image blocks. Each block can contain an image frame and control information for animation. It supports a palette of up to 256 colors per frame.
Advantages
- Animation support: The most widely supported format for simple animations.
- Lossless compression: Good for sharp edges and flat colors.
- Transparency: Supports binary (on/off) transparency.
Disadvantages
- Limited colors: Only supports 256 colors, making it unsuitable for photographs.
- Large file size: Animations can become large quickly compared to modern video formats.
- Patent issues: Historically plagued by the LZW patent (expired in 2004).
Common Use Cases
Web animations and memes
Simple logos and graphics
Social media reactions
Banner ads
Advertisement
