1.JPEG?
JPEG format is a compressed picture format that balances size and quality. Generally speaking, it is: high compression ratio = low image quality = small file. Conversely, low compression ratio = high image quality = large file. JPEG file is not regarded as a lossless image format, because it cannot retain 100% of the pixel data of the original image.
Use:
Because of this extremely sensitive balance characteristic, JPEG is very suitable for those pictures (photos) with rich pixel colors that allow slight distortion. On the contrary, JPEG format pictures are not suitable for pictures with simple colors (less tones), such as LOGO and icons.
2.GIF format
GIF format is a specially developed picture format, which enables pictures to be applied to online applications. Gif, sometimes called "Giff", is a lossless 8-bit picture format. "Lossless" means that the pixel data information of the original picture 100% is retained. The technical term "8-bit" refers to the color depth that can be expressed-an 8-bit image can only support 256 different colors at most (images with more than 256 colors will be distorted if saved with gif images).
Use:
Due to the limitation of 8-bit color depth, Gif is not suitable for all kinds of photo storage occasions with too many colors. But it is very suitable for the following occasions:
* Logo
* small Icon (icon)
* Pictures used for layout (such as layout angles and borders, etc.). )
* Simple small pictures with no more than 256 colors.
Transparent features:
GIF supports basic transparency, which means that you can make some pixels of a picture "invisible". When it is placed in a web page, we can see the background color (picture) behind this picture through these invisible areas. This feature is very useful: if you need to put the content of a gif picture on top of all the pictures, you can make it transparent.
Compression characteristics:
GIF format is compressed by LZW algorithm, which is a patent applied by Unisys. A long time ago, if you wanted to use GIF format, it meant that you had to pay Unisys to apply for a patent license. Fortunately, this patented technology expired on June 20, 2003, and now we can use GIF for free!
Interlaced scanning:
GIF also supports interlaced scanning. Interlaced scanning can speed up the loading and display of pictures in the browser. This function is especially practical for people with slow network speed.
Animation GIF:
A dynamic GIF file is a dynamic picture composed of several frames of pictures. When displaying, these dynamic frames are repeatedly drawn and read out, thus forming a simple animation effect. Reasonable use of GIF animation can add dynamic and static effects to web pages, while excessive use will make web pages messy.