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

后端 未结 13 1794
無奈伤痛
無奈伤痛 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:11

    png has a wider color pallete than gif and gif is properitary while png is not. gif can do animations, what normal-png cannot. png-transparency is only supported by browser roughly more recent than IE6, but there is a Javascript fix for that problem. Both support alpha transparency. In general I would say that you should use png for most webgraphics while using jpeg for photos, screenshots, or similiar because png compression does not work too good on thoose.

提交回复
热议问题