The knowledge of this article is excerpted from: Wang Mitiu. On the storage format of digital graphic image. Journal of Hunan Rtvu, 2004 (1)
A few basic concepts about digital graphic images
L, pixel (pixel)
A pixel is the abbreviation of a graphical unit (pictureelement), which is the complete unit of the smallest bitmap. There are two properties of a pixel: one pixel has a specific position relative to the other pixels in the bitmap image, and the other is a color depth that can be measured with a bit.
2. Image resolution
Image resolution usually refers to the number of pixels per inch, expressed in PPI (Ptxelsperinch). The image resolution depends on the size of the display image. In digital image, the size of image resolution directly affects the quality of image. Resolution is proportional to the clarity of the image. The higher the resolution, the clearer the image, of course, the resulting graphics image files will be larger, the graphics processing of the required computer memory more, while the CPU processing time will be longer.
3, the image of the bit resolution
The bit resolution of the image is also known as the bit depth, which is used to measure the number of bits per pixel storing information. This resolution determines how many color levels can be possible, so sometimes the bit resolution of an image is called the color depth. Common features are 8-bit, 16-bit, 24-bit, 32-bit, and 48-bit colors. The "bit" here is actually computed at a power of 2. such as 24-bit color can combine 224=16,777,216 more than 16 million (16MiIlIon) color level, which is more than the human eye can distinguish the color.
Second, digital graphics image Storage format
(i) Classification
Often encountered in the digital graphics image Storage format has a bitmap image mode and vector graphics patterns.
1. Bitmap (Bitmap Image)
A bitmap image, also known as a lattice image, a bit-mapped image, is a recognizable image consisting of a series of pixels. If you think of a bitmap image as a numeric rectangle, any element in the rectangle (that is, pixels) corresponds to a point in the image, and the corresponding value corresponds to the color or grayscale of the point.
Bitmap images are related to resolution, and any bitmap image contains a limited number of pixels. The image resolution depends on the size of the display image. Displays an image hour with fewer pixels. The resolution is increased, and the pixel becomes larger when the image is large, reducing the resolution. When an image is displayed very large, it is possible to see the jagged edge and the transition of the block structure, like a mosaic image. If you want the edges to be smooth, you must increase the number of pixels in the image.
Features of bitmap images:
(1) A bitmap image is any image consisting of a fixed number of pixels, no matter how many colors it has. So Bitmap images are the most appropriate way to deal with complex images or images like real photographs.
(2) The quality of the bitmap image is related to the resolution of the image. Therefore, according to different image quality needs, set different image resolution, can be economical and fast image processing. When the image needs high quality output or save, want to get clear image, then improve the image resolution. Of course that's the case. As the resulting image file increases, it needs a large storage space, processing the image time is also longer. For small images, the image resolution can be set lower by only displaying works on the screen, such as multimedia images. It is best to practice repeatedly and set the appropriate image resolution as needed.
(3) mentioned above bitmap image needs to occupy a lot of storage space and longer processing time, a simple bitmap several k to hundreds of K, and complex bitmap will occupy dozens of m or even greater storage space. The solution is: the use of larger storage, high-capacity disk, CD-ROM and so on. Second is: the use of software to organize data, reduce the size of bitmap image files-file compression. Here are two points to note: ① If lossy compression is used. The compressed file lost some of the original image data, sometimes this loss may have a little impact on the image viewing. ② use of file compression, the compression format used if the application software can be compatible with the compression format.
2. Vector image (vectors image)
Vector graphics directly describe every point in the image data. Instead, we describe the processes and methods that produce these points, and use mathematical equations to describe the edges and inner fills of the graph to create the graph. The key of vector graphics is that the computer uses mathematical equations to describe objects. Vector graphics are composed of various vector objects, it is the mathematical principle of a variety of vector objects from the combination of graphics, in the form of a group of instructions. These instructions describe the various properties of the objects, such as lines, circles, arcs, etc., which are attached to the table in the graph, and can be used to represent the surface, illumination and material effects of the image in a more complex form. Each object in the graph is a separate entity that defines its own colors, shapes, outlines, dimensions, and position.
Characteristics of Vector Graphics:
(1) Because vector graphics define line segments, shapes and texts as mathematical equations, vector graphics are independent of resolution and more meticulous and real to graphics. It can change the size of the graphic arbitrarily without causing distortion and reducing the quality of the graphic. This is a very useful feature of vector graphics.
(2) because vector graphics are independent of resolution, vector graphics can automatically adapt to the maximum resolution of output devices. When the printer is used as an output device, the printer turns the mathematical equation of the vector graph into the pixel of the printer, regardless of how large the graphic is printed, the graphic looks very evenly and clearly.
(3) because vector graphics is a mathematical description of the graphic, it does not store every point of the graphic, but only the outline of the graphic content, so that no bitmap image of the vector graphics storage space than the bitmap image storage space is much smaller.
(4) in vector graphics, the size of a file depends on the number and complexity of objects contained in the graph, so the size of the vector graphics file has little to do with the size of the output graphic, which is exactly the opposite of the bitmap image.
(5) You can edit only one of the objects in a vector graphic without affecting other objects in the graphic. Objects in vector graphics can overwrite each other without affecting each other.
3, the difference between bitmap image and vector graphics
(1) Vector graphics display process is in accordance with the entity (some simple objects such as circles, lines, balls, cubes, etc.) in the order of the sequence, and the bitmap image display process is arranged in accordance with the image of the sequence of pixels, and the image content is irrelevant.
(2) Vector graphics can be transformed (such as amplification) without distortion, and bitmap image transformation (such as amplification) is likely to occur distortion. This is because the bitmap image simply handles the element.
(3) Vector graphics can be the object of the unit to modify the properties, editing, and other operations, and bitmap images can not. This is because the bitmap image does not have a separate unit on the content of the image, only the pixel or image block can be processed.
(4) Vector graphics is actually the abstraction of bitmap images, processing and storage in accordance with the specific format of the diagram, but on the screen when the display is not different from the bitmap image.
After understanding the classification of digital graphic image Storage format, the following describes the storage format of some common graphic image files.
(ii) The storage format of common digital graphic image files (limited space, listing only common formats)
1, BMP format
BMP image files were first applied to Microsoft Windows systems launched by Microsoft. is a ms-windows standard bitmap image File format. This format contains very rich image information because it is rarely compressed in a stored procedure. The file format supports RGB, indexed color, grayscale, and bitmap color patterns, and also supports l~32 bit formats, where the 4~8-bit image uses RLE (stroke-length encoding), which does not lose data. The biggest drawback is that it takes up a lot of storage space.
2, GIF format
The GIF (Graphic Interchange Fomat Graphics Interchange Format) format is designed by the COMPN server company. This format is one of the most widely used image file formats on the World Wind Web. The biggest feature of the GLF format is high compression ratio, which consumes less storage space. This format is limited by the 8-bit storage format, which requires that the number of colors in the image be reduced to 256 or less, which is a major factor in reducing file size and consuming storage space. Because the format stores fewer colors in the image. So the GIF format is typically used for images with no too many color transitions, and only indexed and grayscale images can be saved in GIF format. Although the format is limited by the storage format, this restriction is advantageous in media that are critical to transmission speed.
3, Jpg/jpeg format
The jpg/jpeg format, a common image file format developed by Joint Photographic Experts Goup (joint image Expert Group), is one of the image file formats currently supported by the network. In fact, Jpg/jpeg is not a format, exactly a bitmap image compression algorithm, other file formats such as PICT format and EPS format, use the JPEG compression algorithm to store data. Jpg/jpeg can be a stunning compression bitmap to reduce the size of the file, the standard compressed file only the original file size of One-tenth, the compression rate can reach 100:1. JPBG uses lossy compression, the compressed file lost some of the original image of some of the less compelling data, if the compression ratio set to 80 or so, it will hardly affect the image display quality. However, repeatedly saving images in JPEG format will reduce the quality of the image and the appearance of manual processing, and even make the image clearly split into fragments, which should be noticed. Because the format compression is relatively large, so this format of the image file is not suitable for enlarged viewing and made of printed matter. Although the format compression is relatively large, but the storage file is small, so the application is wider.