Only PNG supports transparency, is that true?

Adam Lee picture Adam Lee · Feb 5, 2012 · Viewed 63.5k times · Source

I found JPG does not support transparency, the alpha value is always 255. I am wondering only png supports transparency?

Answer

Richard G. Nielsen picture Richard G. Nielsen · Feb 5, 2012
  • png-32 supports different levels of transparency. Each pixel can have an opacity between 0 and 255, with 0 as completely transparent.

  • png-24 supports setting one color as fully transparent. Everything else will be opaque.

  • gif uses a color palette. You can specify that one color in the palette is fully transparent.

  • png-8 also uses a color palette but each color in the palette has its own opacity value, so it supports varying levels of transparency too.

  • jpg does not support transparency.