JPEG vs GIF vs PNG

 
  JPEG GIF PNG
Number of colors 16 million up to 256 up to 24bit
Transparency No Yes, but no opacity Yes, with opacity
Compression lossy lossless up to 256 colors lossless or lossy
Advantages good compression for photos
  • transparency works on IE6
  • animation
  • better lossless compression than GIF
  • opacity (multi-level transparency)
Disadvantage quality loss for graphics
  • limited number of colors
  • PNG has better compression
  • only 1-level transparency
  • file size would be too big for photos
  • transparent PNG is not supported by IE6
Best for photos animation graphics, logos
Share