GIF format feature transparency GIF is a type of Boolean transparency that can be either fully transparent or opaque, but it is not translucent (alpha transparent). This format supports animations. Lossless M GIF is a lossless image format that is completely opaque, but it is not translucent (alpha transparent).
This format supports animations.
No loss of
GIF is a lossless image format, which also means that you can do anything with GIF images without wasting the quality of the image.
GIF is compressed using an algorithm called LZW, in which pixels are compressed horizontally from top to bottom while compressing the GIF, which means that the horizontal GIF picture is smaller than the vertical GIF picture under the same conditions. For example 500*10 's picture is smaller than the 10*500 picture
Interval progressive Display
GIF supports optional interval progressive display + The above features show that only 256 colors of GIF pictures are not suitable for photos, but it is suitable for the color requirements of graphics (such as icons, charts, etc.), it is not the best choice, we will see in the later PNG is the best choice.
JPEG format features Transparency
Loss of
In addition to some such as rotation (just 90, 180, 270 degrees rotation), trim, from the standard type to the advanced type, edit the image of the original data, all other operations on the JPEG image processing will cause its quality loss. So we generally use PNG as the transition format in the editing process.
Interlaced progressive display
It supports an interlaced display (but IE does not support this property, but IE is displayed when the entire image information is fully reachable).
From the above you can see that JPEG is the most suitable photographic picture and digital camera above the web.
PNG format feature Type "
PNG This picture format includes many subclasses, but in practice can be roughly divided into 256-color PNG and full-text PNG, you can use the 256-color PNG instead of GIF, with full full PNG instead of JPEG
Transparency
PNG is fully supported alpha transparent (transparent, translucent, opaque), although there are two odd phenomena in IE6 (discussed in detail below)
No loss of
PNG is a lossless image format, which also means that you can do anything with PNG images without wasting the quality of the image. This also allows PNG to be used as a transition format for JPEG editing
Horizontal scan
Like GIF, PNG is also horizontally scanned, which means that the horizontal repeat color is smaller than the picture of the vertical repeating color
Interval progressive Display
It supports interval progressive display, but it makes the picture larger
PNG24
panchromatic PNG alias)
PNG32
Other picture formats compared to PNG
Well-known GIF fit graphics, JPEG fit photos, PNG series two kinds are suitable
Compared to GIF
PNG 8 has all the features of GIF, except that it does not support animations, but it is more advantageous than GIF that it supports alpha transparency and PNG8 compression. So, in most cases, you should use PNG8 instead of GIF (except for very small picture gif will have better compression outside).
Compared to JPEG
JPEG is better compressed than full color PNG, so it also makes JPEG fit for photos, but it is easy to lose quality while editing JPEG, so full color PNG is suitable as a transition format for editing JPEG.