File format

GIF - Graphics Interchange Format

PDF Dictionary: Learn about Graphics Interchange Format, commonly used for web animations.

What is a GIF file?

A GIF (Graphics Interchange Format) file is a widely used image format known for its support of animations and transparency. Developed by CompuServe, GIF files use a lossless compression lossless compression technique that maintains image quality while reducing file size.

Frequently referred to as 'GIFs', Graphics Interchange Format files are commonly used for sharing short animations and graphics online. This format is also popular for memes and expressing emotions with looping visuals.

Here is a short, non-exhaustive list of programs that can open GIF files:

  • Adobe Photoshop
  • Microsoft Windows Photo Gallery Viewer
  • Apple Preview
  • Corel Paint Shop Pro
  • GIMP

What GIF is good at, and where it is not

GIF stores up to 256 colours per image, chosen from a palette, and compresses them losslessly. On flat-coloured artwork such as logos, diagrams and simple icons, that is efficient and exact. On a photograph it is not. Reducing millions of colours to 256 produces visible banding, and the result is usually both larger and worse-looking than the same picture as a JPG.

Its transparency is all or nothing: a pixel is either fully transparent or fully opaque, with no partial transparency. That is why a GIF placed over a coloured background can show hard, jagged edges where PNG would blend smoothly.

Animation and what happens when you convert one

GIF is still widely used for short looping animations, which it stores as a series of frames with timing information in a single file.

A PDF page is static, so converting an animated GIF keeps one frame rather than the motion. That is worth knowing before converting: if the animation matters, the frames have to be laid out as separate images, and if only the artwork matters, any frame will do.