What are the different usecases of PNG vs. GIF vs. JPEG vs. SVG?

后端 未结 13 2006
無奈伤痛
無奈伤痛 2020-11-22 11:28

When should certain image file types be used when building websites or interfaces, etc?

What are their points of strength and weakness?

I know that PNG &

13条回答
  •  甜味超标
    2020-11-22 12:02

    As pointed out by @aarjithn, that WebP is a codec for storing photographs.

    This is also a codec to store animations (animated image sequence). As of 2020, most mainstream browsers has out of the box support for it (compatibility table). Note for WIC a plugin is available.

    It has advantages over GIF because it is based on a video codec VP8 and has a broader color range than GIF, where GIF limits to 256 colors it expands it to 224 = 16777216 colors, still saving significant amount of space.

提交回复
热议问题