Various image formats

After ps pictures, set a transparent background and save it in jpg format, it is found that the transparent background cannot be displayed. Since I didn't notice it before, I checked it out.
It turns out that in our common picture formats, pictures in BMP and JPG formats cannot save transparent information, and the system will default to a white background. Pictures in GIF format can save transparent information, but pictures in GIF format can only have up to 256 colors, so they can only be used in occasions with low requirements for pictures. Another format: PNG format, PNG format images support lossless compression, and can well preserve transparent information.
Summary: Only png and gif formats can save transparent information. Among them, the transparent format of PNG is better, and if there is a gradient transparent effect, it can be well preserved. GIF format pictures can be transparent, but there is no transparent effect. The relative image quality is worse than PNG, but the KB size occupied is relatively small.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326405497&siteId=291194637