*.gif
.gif
is a file format mostly known for the fact that it can save animations. It’s a fairly old format, and it does its compression by indexing the colors to a maximum of 256 colors per frame. Because we can technically design an image for 256 colors and are always able save over an edited GIF without any kind of extra degradation, this is a lossless compression technique.
256 色的颜色数量也意味着它在处理灰度图像时不影响画质。但无论如何,只要图像不是动画,最好还是使用 *.jpg 或者 *.png。