What is GIF (Graphics Interchange Format)?
GIF is a raster format limited to a 256-colour palette per frame, with support for simple animation and 1-bit (on/off) transparency. It uses lossless LZW compression.
Best for: Short looping animations and simple graphics with few colours. Trade-offs: Only 256 colours (poor for photos), 1-bit transparency with hard edges, and large file sizes compared with video or WebP.
What is PNG (Portable Network Graphics)?
PNG is a lossless raster image format that supports up to 16.7 million colours plus a full 8-bit alpha channel for transparency. It uses DEFLATE compression, so re-saving a PNG never degrades quality.
Best for: Logos, icons, screenshots, line art, and any image that needs sharp edges or a transparent background. Trade-offs: Files are much larger than JPG or WebP for photographs, and PNG cannot store animation.
| Property | GIF | PNG |
|---|
| Compression | Lossless | Lossless |
| Transparency | Yes | Yes |
| Typical use | Short looping animations and simple graphics with few colours. | Logos |