Image File Formats for the Web
GIF | JPEG/JPG | PNG | SVG | |
---|---|---|---|---|
Full name | Graphics Interchange Format | Joint Photographic Experts Group | Portable Network Graphics | Scalable Vector Graphics |
File name extension | .gif | .jpeg or .jpg | .png | .svg |
Raster or vector | raster | raster | raster | vector |
Animation | yes | no | no | yes |
Transparency | yes (but fixed)* | no | yes (variable)* | yes |
Compression | lossless | lossy** | lossless | lossless |
Maximum number of colors |
256 | millions | 256 (PNG-8 format) | millions |
millions (PNG-24 format) | ||||
Primary use | line art, logos, flat color | photographs, continous tone | line art, logos, flat color | scalable online images |
Open standard | yes (patent expired) | yes | yes | yes |
Intended output | screen | screen or print | screen or print | screen |
Established | 1987 | 1992 | 1995 | 2001 |
Browser support | excellent | excellent | excellent | improving |
* Transparency: With GIF, a pixel is either fully transparent or it's opaque. With PNG a pixel can be partially transparent.
** Compression: Because of "lossy" compression, every time a JPEG is saved some information and quality is lost.