Coding of graphic information. Lesson on the topic "Coding of graphic information

Kosarlukova Irina Vyacheslavna

IT-teacher

MBOU "Secondary school No. 14"

Bryansk

topic lesson

"Coding graphic information.

Bitmaps on the monitor screen

Grade 9

The purpose of the lesson:

    Examine the parameters for the graphic mode of the monitor screen;

    Formulate the principle of storing a bitmap image in the computer memory;

    To consolidate the skills of solving problems on the calculation of the amount of memory required to store a color image.

    To form the ability of students to work according to the algorithm (accuracy, consistency, use of editor tools).

During the classes

    Organizing time

    Repetition. Checking d / z

    • What are the types of information?

      What units of measurement do you know?

III.New material.

Graphical information can be presented in the form analog and in discrete form. An example of an analog image is a painting, and a discrete image is an image printed on inkjet printer made up of individual dots. Spatial Discretization
converting a graphic image from an analog (continuous) form to a digital (discrete) form.

A raster image is a collection of dots (pixels) of different colors. Pixel is the minimum area of ​​the image for which the color can be set independently. In the process of sampling, different color palettes can be used, i.e., sets of those colors that can take on image points. Each color can be considered as a possible state of a point

For a black and white image, the information volume of one point is equal to one bit. When encoding a graphic black and white image, 0 and 1 are used. 0 is black, 1 is white.

0

0

0

1

1

0

1

1

A raster image is a collection of dots (pixels) of different colors.

For four color - 2 bits.

8 colors require 3 bits.

For 16 colors - 4 bits.

For 256 colors - 8 bits (1 byte).

The color image on the monitor screen is formed by mixing three basic colors: red, green, blue. so-called. RGB model.

Base colors can be given different intensities to achieve a rich palette.

4,294,967,296 colors (True Color) - 32 bits (4 bytes).

FormulaN =2 I , N- the number of colors on the palette,i- the number of bits for storing information about one pixel.IV = I * X * Y , Where IV– information volume of video memory (Bit),I– color depth (bits per dot),X- the number of dots horizontally,Y- the number of vertical dots.

Color depth is the amount of information that is used to encode the color of an image point.

color depth, I (bits)

The number of colors in the paletteN

2 8 = 256

2 16 = 65 536

2 24 = 16777216

The image quality on the monitor screen depends on spatial resolution and color depth. These two parameters set the graphic mode of the monitor screen. The spatial resolution of a monitor screen is defined as the product of the number of image lines by the number of dots per line. The monitor can display information with different spatial resolutions. For example: 800*600, 1024*768, 1280*720, 1280*1024, 1400*1050. The greater the spatial resolution and color depth, the higher the image quality.

Task #1: The b/w picture is built on a monitor screen with a resolution of 800 * 600. How much memory does it take up?

Answer: 60 kb

Task 2:The drawing is built using a palette of 256 colors on a monitor screen with a graphic resolution of 1024 * 768. Calculate the amount of memory required to store this drawing.

Solution: N=2 I, N is the number of colors on the palette, i is the number of bits for storing information about one pixel.

Iv = I * X * Y , where Iv is the information volume of the video memory (Bits), I is the color depth (bits per dot), X is the number of dots horizontally, Y is the number of dots vertically.

1024 * 768

1024 * 768 * 8 bits = 6291456 bits = 6291456: 8 = 786432 bytes = 786432:1024 = 768 kbytes

(number of pixels)

(number of bits per color per pixel)

Answer: 768 kb

IV . Consolidation of the studied material. Independent work by options:

1 option

1. How much video memory is required for graphics mode with a resolution of 1024 * 768 pixels and a color depth of 16 bits? (1.5 MB)

2. Color with a palette of 256 colors bitmap graphic image has a size of 20*10 dots. What information volume does the image have? Write your answer in bytes. (200 bytes)

3. A screenshot of the monitor is 2.25 MB. Determine the screen resolution (in pixels) if 3 bytes are used to encode one pixel? (1024*768).

Option 2

1. How much video memory is required for graphics mode with a resolution of 256 * 256 pixels and a color depth of 24 bits? Write your answer in bytes. (192 bytes)

2. Determine the size of the file in which the photo is saved with a size of 1024*768 pixels, if 3 bytes are used to encode one pixel. Write your answer in MB. (2.25 MB)

3. Indicate in kilobytes the minimum amount of information about a bitmap 2 8 - color image 256*256 pixels in size? (64 KB)

VI. Summing up the lesson.

Graphic information encoding

Graphic information on
the monitor screen is displayed in
as a bitmap,
which is formed from
a certain number of lines
which, in turn,
contain certain
amount of points.

Number of colors reproduced on
monitor screen (N), and the number of bits
allocated in video memory for each
pixel (I), linked by the formula: N=2I
The more bits used, the more
more colors available
get.

Image quality

determined by the resolution
ability, i.e. quantity
points from which
develops
As well as bit depth (or
color depth), i.e. quantity
bit per point color storage

Examples

Example 1. The drawing is built using
palette of 256 colors on the monitor screen with
graphics resolution of 1024 x 768.
Calculate the amount of memory required for
storage of this drawing.
Solution: 256=2I I=8
V=1024 * 768 * 8 bits = 1024 * 768 bytes = 768
KB.
Answer: 768 KB.

Examples

Example 2. Calculate the amount of memory,
needed to store the drawing
built with graphic
monitor resolution 800 x 600 s
palette of 32 colors.
Solution
800 * 600 *5 bits = 100 * 3000 bytes 300
KB

Examples

Example 3. What is the information volume of a book if it contains 200
pages of text (each page has 50 lines of 80 characters)
and 10 color drawings. Each drawing is built with
monitor graphic resolution 800 x 600 with palette 16
colors.
Solution:
1 character - 1 byte
80 * 50 * 200 bytes 80 * 10 KB = 800 KB - for storage
text
16 = 24
10 * (800 * 600 * 4) bits = 10 * 100 * 2400 bytes 2400 KB for
storage of drawings
2400 + 800 = 3200 KB 3.2 MB
Answer: 3.2 MB

slide 1

Topic: Coding and processing of graphic information Informatics teacher Elizarova N.E. Gnilitsa Orthodox Gymnasium

slide 2

Graphical information Analogue form Discrete form Spatial sampling Scan

slide 3

A PIXEL is the minimum area of ​​an image for which a color can be set independently. The RESOLUTION of a bitmap image is determined by the number of dots both horizontally and vertically per unit length of the image. The smaller the dot size, the greater the resolution. The RESOLUTION value is expressed in dpi (the number of dots in a 2.54 cm (inch) image strip)

slide 4

Color Depth A bitmap image is a collection of dots (pixels) of different colors. For a black and white image, the information volume of one point is equal to one bit (either black or white - either 1 or 0). For four color - 2 bits. 8 colors require 3 bits. For 16 colors - 4 bits. For 256 colors - 8 bits (1 byte), etc. The number of colors in the palette (N) and the amount of information required to encode each point (I) are related and can be calculated using the formula: N=2I

slide 5

The amount of information that is used to encode the color of one point in an image is called COLOR DEPTH.

slide 6

The most common color depths are 4,8,16, and 24 bits per pixel. Knowing the color depth, you can use the formula to calculate the number of colors in the palette.

Slide 7

Calculating the amount of video memory The information amount of the required video memory can be calculated using the formula: Imemory=I * X * Y where Imemory is the information amount of video memory in bits; X * Y - number of image pixels (horizontally and vertically); I is the color depth in bits per point. EXAMPLE. The required amount of video memory for graphics mode with a spatial resolution of 800 x 600 pixels and a color depth of 24 bits is:

Slide 8

Slide 9

The color palette in the RGB color rendering system From the monitor screen, a person perceives color as the sum of the radiation of three basic colors (red, green, blue). The color from the palette can be determined using the formula: Color = R + G + B, Where R, G, B take values ​​from 0 to max So with a color depth of 24 bits, 8 bits are allocated for encoding each of the basic colors, then of the colors, N=28=256 intensity levels are possible.

slide 10

Color Shaping in the RGB System In the RGB system, the color palette is formed by adding red, green, and blue colors Color Shaping Color Black = 0+0+0 White =Rmax+Gmax+Bmax Red = Rmax+0+0 Green = Gmax+0+0 Blue = Bmax+0+0 Cyan =0+ Gmax+Bmax Magenta = Rmax+0+Bmax Yellow = Rmax+Gmax+0

slide 11

CMYK color gamut The printer uses the CMYK color gamut when printing images. The main colors in it are Cyan - blue, Magenta - purple and Yellow - yellow. The CMYK system, unlike RGB, is based on the perception of not emitted, but reflected light. For example, blue ink applied to paper absorbs red and reflects green and blue. CMYK palette colors can be defined using the formula: Color = C + M + Y Where C, M and Y are values ​​from 0% to 100%

slide 12

CMYK color shaping In CMYK, a palette of colors is formed by superimposing cyan, magenta, yellow, and black inks. Color Color formation Black = C+M+Y= - G - B - R White C=0 M=0 Y=0 Red = Y+M= - G - B Green = Y+C= - R - B Blue = M +C= - R -G Cyan = - R = G+B Magenta = - G = R+B Yellow = - B = R+G

slide 13

Color palette in HSB rendering system The HSB rendering system uses Color Hue, Saturation, Lightness as basic parameters In the HSB rendering system, the color palette is formed by setting the hue, saturation and brightness values.

Loading...
Top