Summary: JPG of photo class: banner, small GIF or PNG8
gif format features:
Transparency
GIF is a Boolean transparent type that can be either fully transparent or completely opaque, but it is not translucent (alpha transparent).
Animation
GIF this format supports animations.
Non-wear Resistance
GIF is a lossless image format, which also means that you can do anything with GIF images without causing loss of image quality.
Horizontal scan
GIF is compressed using an algorithm called LZW, and when the GIF is compressed, the pixels are compressed horizontally from top to bottom, which also 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 10*500 's picture
Interval progressive Display
GIF supports optional interval progressive display
The above features show that only 256 colors of the GIF picture is not suitable for the photo, it is suitable for the color requirements of the graphics are not high.
--------------------------------------------------------------------------------
JPEG format features:
Transparency
It does not support transparency.
Animation
It also does not support animations.
Wear resistance
In addition to some such as rotation (just 90, 180, 270 degrees of rotation), cutting, from standard type to advanced type, editing the original data of the picture, all other operations on the JPEG image processing will make its quality loss. So we generally use PNG as the transition format in the editing process.
Interlaced progressive display
It supports interlaced progressive display (but IE does not support this property, but IE will be displayed when the entire image information arrives completely).
From the above can be seen JPEG is the most suitable for the web above the photographic pictures and digital camera.
--------------------------------------------------------------------------------
PNG format features:
Transparency
PNG is fully supported for Alpha transparent (transparent, translucent, opaque), although there are two strange phenomena in IE6 (discussed in detail below)
Animation
It does not support animations
Non-wear Resistance
PNG is a lossless image format, which also means that you can do anything with PNG images without causing loss of image quality. This also allows PNG to be used as a transition format for JPEG editing
Horizontal scan
Like GIF, PNG is also scanned horizontally, which means that the horizontal repeating color is smaller than the picture of the vertical repeating color
Interval progressive Display
It supports progressive display of intervals, but makes the image larger
The first kind of PNG is called PNG8 (Boolean transparent), which can be understood as a static GIF.
They are all only 256 colors, also support index transparency, is to specify whether a pixel is not transparent
The second PNG is also called PNG8 (Alpha Transparent) to specify the transparency of pixels, such as 50% transparency
This advantage is smaller than the PNG24/32, but the same effect
The disadvantage is that IE6 support is not good, will be translucent pixels display transparent
The third kind of PNG is called PNG24
PNG24 opaque, but with a large number of colors, more than 256 colors
And the Png24 exported in Photoshop is actually png32.
The fourth kind of PNG is called PNG32
Like Photoshop's psd, is the default source file format for fireworks, including layer and channel information
The difference with PNG24 is that it's more transparent information.
The disadvantage is that IE6 support is not good, the transparent area will be displayed as a blue gray background: Only through the impact of the performance of the method AlphaImageLoader and need to add special tags (VML).
Note:
Boolean transparent PNG8 can be displayed normally in any browser (just like GIF).
Alpha Transparent Png8 in the browser except IE6 and below the error display is transparent, other browsers can be normal
Photoshop can only export Boolean transparent PNG8. (Some png8 may have unfinished edges under IE6, as text, rounded corners, etc. usually have the effect of weakening the edges.) Can be trimmed before export)
Fireworks can export both Boolean-transparent PNG8 and alpha-transparent PNG8.
--------------------------------------------------------------------------------
other image formats compared to PNG:
It is well known that GIF is suitable for graphics, JPEG suitable for photos and two kinds of PNG series.
Compared to GIF
For the same color value, the GIF format picture is smaller than the PNG32 format picture. But Png8 is the best choice.
PNG 8 does not support animations, PNG8 has all the features of GIF, but the advantage over GIF is that it supports alpha transparency and better compression. So, most of the cases you should use PNG8 not GIF (except very small pictures GIF will have better compression outside).
Compared to JPEG
JPEG has better compression than panchromatic png, so it also makes JPEG suitable for photos, but it is easy to lose quality when editing JPEG, so panchromatic PNG is suitable as the transition format for editing JPEG.
Page Picture jpg,gif,png contrast.