Coding of graphic data - Informatics and information technologies

Encoding of graphic data

The graphic image with its increase can be represented as the smallest points that form the characteristic pattern - raster. Thus, any image can be encoded with the coordinates of points having individual brightness. Any black and white image can be transmitted with 256 gradations of gray (from white to black), thereby the brightness of each point of the black and white image can be encoded with an 8-bit binary number - one byte.

For color graphics encoding, the principle of color decomposition into basic components is used: red , green (Green) and blue (Blue) . This principle is based on the fact that any color can be obtained by mixing the three specified colors. The coding system for the first letters of the names of the main mixing colors is called the RGB system and describes the behavior of the additive color model, the properties of which are illustrated using color circles (Figure 1.1). If 256 gradations (8-bit number) are used to encode the brightness of each constituent color, as is customary for a black and white image, then a 24-bit binary number is sufficient to encode the color dot.

This mode of rendering color graphics is called full color (True Color) and allows you to fix about 16.5 million different color shades using 3 bytes. Each of the primary colors can be associated with an additional color, i. E. color, complementary to white. Additional colors include blue (Cyan), magenta and yellow (Yellow). The decomposition principle is applicable for additional colors, t .e. any color can be obtained by mixing them. This method of color coding is used in polygraphy, where the fourth paint is also used - black (Black). This coding system is called CMYK (the black color is indicated in the title with the last letter of its The name in order not to confuse it with -

RGB system in the form of color circles

Fig. 1.1. RGB system in the form of color circles

dyeing and abbreviations with blue - Blue). This mode of graphics representation uses 32 bits and is also called full color (Thru Color). If you reduce the number of binary bits used for encoding of each point, twice, you can reduce the amount of data, but the range of colors will decrease to 65 536 shades. This encoding of color graphics with 16-bit binary numbers is called High Color mode.

When working with color graphics, index encoding method is used. Here the code of each dot of the raster stores the color, but only its number (index) in some reference table, called the palette, which must necessarily be applied to the graphic data.

The graphic information on the display screen is formed from points (pixels). Pixel - from the picture element, which means the image element. In modern computers, the resolution (the number of points on the display screen) depends on the video adapter and can be changed programmatically. Color images can have different modes: 16 colors, 256 colors, 65 536 colors ( High Color), 16 777 216 colors ( True Color). Thus, for example, for mode High Color to one pixel has 16 bits of memory and with a screen resolution of 800 × 600 points required to store its image, the amount of video memory will be V = 2 bytes • 480000 = 960 000 bytes = 937.5 KB. Similarly, the amount of video memory required to store the bitmap of the image with other video modes is calculated. The video memory of the computer stores a bitmap, which is a binary image code that is read in accordance with the frame rate and displayed on the monitor screen.

Ошибка в функции вывода объектов.