How to determine the number of colors in the palette of an image. Does the number of flowers in a bouquet matter? What is bit depth

Bit depth is one of the parameters everyone is chasing, but few photographers really understand it. Photoshop offers 8, 16 and 32 bit file formats. We sometimes see files marked as 24 and 48-bit. And our cameras often offer 12 and 14-bit files, although you can get 16-bit with a medium format camera. What does all this mean, and what really matters?

What is bit depth?

Before comparing the different options, let's first discuss what the name means. A bit is a computer unit of measure related to storing information in the form of 1 or 0. One bit can have only one of two values: 1 or 0, yes or no. If it were a pixel, it would be completely black or completely white. Not very helpful.

In order to describe a more complex color, we can combine several bits. Each time we add bits, the number of potential combinations doubles. One bit has 2 possible values ​​0 or 1. When combining 2 bits, you can have four possible values ​​(00, 01, 10 and 11). When you concatenate 3 bits, you can have eight possible values ​​(000, 001, 010, 011, 100, 101, 110, and 111). Etc. In general, the number of possible choices will be two raised to the power of the number of bits. Thus, "8-bit" = 2 8 = 256 possible integer values. In Photoshop, this is represented as integers 0-255 (internally, this is the binary code 00000000-11111111 for the computer).

This is how bit depth defines the smallest changes you can make over a range of values. If our grayscale from pure black to pure white has 4 values, which we get from a 2-bit color, then we will be able to use black, dark gray, light gray and white. This is quite small for photography. But if we have enough bits, we have enough wide gray steps to create what we will see as a perfectly smooth black to white gradient.

Below is an example of comparing a black and white gradient at different bit depths. This image is just an example. Click on it to see the full resolution JPEG2000 up to 14-bit. Depending on the quality of your monitor, you can probably only see differences up to 8 or 10 bits.

How to understand bit depth?

It would be convenient if all "bit depths" could be compared directly, but there are some differences in terminology that need to be understood.

Please note that the image above is black and white. A color image is usually composed of red, green, and blue pixels to create color. Each of these colors is treated as a "channel" by the computer and monitor. Software such as Photoshop and Lightroom counts the number of bits per channel. So 8 bits means 8 bits per channel. This means that an 8-bit RGB image in Photoshop will have a total of 24 bits per pixel (8 for red, 8 for green, and 8 for blue). A 16-bit RGB image or LAB in Photoshop will be 48 bits per pixel, etc.

You might assume that 16-bit means 16-bit per channel in Photoshop, but in this case it works differently. Photoshop actually uses 16 bits per channel. However, it treats 16-bit snapshots differently. It just adds one bit to 15 bits. This is sometimes referred to as 15 + 1 bit. This means that instead of 2 16 possible values ​​(which would equal 65536 possible values) there are only 2 15 + 1 possible values, which is 32768 + 1 = 32769.

So, in terms of quality, it's fair to say that Adobe's 16-bit mode actually only contains 15-bits. You do not believe? Look at the 16-bit scale for the Info panel in Photoshop, which shows a scale of 0-32768 (which means 32769 values ​​given zero. Why does Adobe do this? According to a statement from Adobe developer Chris Cox, this allows Photoshop to run much faster and provides an accurate midpoint for range, which is useful for blending modes.

Most cameras will allow you to save files in 8-bit (JPG) or 12 to 16-bit (RAW). So why doesn't Photoshop open a 12 or 14 bit RAW file like 12 or 14 bit? On the one hand, it would take a lot of resources to run Photoshop and change file formats to support different bit depths. And opening 12-bit files as 16-bit is really no different than opening an 8-bit JPG and then converting to 16-bit. There is no immediate visual difference. But most importantly, there are huge benefits to using a file format with a few extra bits (as we will discuss later).

For displays, the terminology changes. Manufacturers want the specs of their equipment to sound seductive. Therefore, 8-bit display modes are usually signed as "24-bit" (because you have 3 channels with 8-bit each). In other words, “24-bit” (“True Color”) for a monitor is not very impressive, it actually means the same as 8-bit for Photoshop. The best option would be "30-48 bits" (called "Deep Color"), which is 10-16 bits per channel, although for many more than 10 bits per channel is overkill.

How many bits can you see?

With a pure gradient (i.e. worst case conditions), many can find banding in a 9-bit gradient that contains 2048 shades of gray on a good display with support for deeper color rendering. The 9-bit gradient is extremely faint, barely perceptible. If you didn’t know about its existence, you wouldn’t see it. And even when you look at it, it will not be easy to tell where the borders of each color are. The 8-bit gradient is relatively easy to see if you look closely at it, although you can still ignore it if you don't look closely. Thus, a 10-bit gradient can be said to be visually identical to a 14-bit or deeper gradient.

Note that if you want to create your own file in Photoshop, the gradient tool will create 8-bit gradients in 8-bit document mode, but even if you convert the document to 16-bit mode, you will still have 8-bit gradient. However, you can create a new gradient in 16-bit mode. However, it will be generated in 12-bit. The program does not have a 16-bit option for the gradient tool in Photoshop, but 12-bit is more than enough for any practical work as it allows for 4096 values.

Don't forget to turn on anti-aliasing in the gradient bar as this is best for testing.

It is also important to note that you are likely to encounter false banding when viewing images at less than 67% magnification.

Why use more bits than you can see?

Why do we have options, even more than 10-bit in our cameras and Photoshop? If we didn't edit the photos, then there would be no need to add more bits than the human eye can see. However, when we start editing photographs, previously hidden differences can easily be licked out.

If we significantly lighten shadows or darken highlights, then we will increase some of the dynamic range. And then any shortcomings will become more obvious. In other words, increasing the contrast in the image works like decreasing the bit depth. If we twist the parameters hard enough, banding may appear in some areas of the image. It will show the transitions between colors. Such moments are usually visible in clear blue skies or in the shadows.

Why do 8-bit images look the same as 16-bit images?

When converting a 16-bit image to 8-bit, you will not see the difference. If so, then why use 16-bit?

It's all about smooth editing. When working with curves or other tools, you will get more tonal and color correction steps. Transitions will be smoother in 16 bits. Therefore, even if the difference may not initially be noticeable, the transition to a lower color bit depth can become a serious problem later, when editing the image.

So how many bits do you really need in a camera?

Changing 4 stops to will provide a loss of just over 4 bits. Varying 3 stops is closer to losing 2 bits. How often do you have to adjust the exposure this much? When working with RAW, correction to +/- 4 stops is an extreme and rare situation, but it does happen, so it is advisable to have an extra 4-5 bits above the visible range in order to have headroom. With a normal range of 9-10 bits, with a margin of norm it can be about 14-15 bits.

In fact, you will probably never need that much data for several reasons:

  • There are not many situations where you will come across a perfect gradient. Clear blue skies are probably the most common example. All other situations have a lot of detail and color transitions are not smooth, so you won't see a difference when using different bit depths.
  • Your camera's accuracy is not high enough to ensure color accuracy. In other words, there is noise in the image. This noise usually makes it much more difficult to see the transitions between colors. It turns out that real images are usually not able to display color transitions in gradients, since the camera is not able to capture the ideal gradient that can be created programmatically.
  • You can remove color transitions during post-processing by using Gaussian blur and adding noise.
  • A large margin of beats is needed only for extreme tonal adjustments.

Taking all this into account, 12-bit sounds like a very reasonable level of detail that would allow for excellent post-processing. However, the camera and the human eye reacts differently to light. The human eye is more sensitive to shadows.

An interesting fact is that a lot depends on the program you are using for post-processing. For example, pulling shadows from the same image in Capture One (CO) and Lightroom can produce different results. In practice, it turned out that CO spoils deep shadows more than its analogue from Adobe. Thus, if you pull in LR, then you can count on 5 stops, and in CO - only 4.

Still, it is best to avoid trying to extend more than 3 stops of dynamic range due to noise and color cast. 12-bit is definitely a smart choice. If you care about quality, not file size, then shoot in 14-bit mode if your camera allows.

How many bits does it cost to use in Photoshop?

Based on the above, it should be clear that 8-bit is not enough. You can immediately see the color transitions in smooth gradients. And if you don't see it right away, even modest adjustments can make the effect noticeable.

It's worth working in 16-bit even if your original file is 8-bit, such as JPG images. The 16-bit mode will give the best results as it will minimize transitions when editing.

There is no point in using 32-bit mode if you are not processing the HDR file.

How many bits do you need for the internet?

The advantages of 16-bit are its enhanced editing capabilities. Converting the final edited image to 8-bit is great for viewing snapshots and has the advantage of creating small files for the web for faster downloads. Make sure anti-aliasing is turned on in Photoshop. If you are using Lightroom to export to JPG, anti-aliasing is used automatically. This helps to add a bit of noise, which should minimize the risk of noticeable 8-bit color gradients.

How many bits do you need to print?

If you are printing at home, you can simply create a copy of the working 16-bit file and process it for printing by printing the working file. But what if you are submitting your images over the internet to a lab? Many will use 16-bit TIF files, which is a great way. However, if a JPG is required for printing, or if you want to send a smaller file, you may encounter questions about converting to 8-bit.

If your print lab accepts 16-bit format (TIFF, PSD, JPEG2000), just ask the experts which files are preferable.

If you need to send a JPG, it will be 8 bits, but that shouldn't be a problem. In fact, 8-bit is great for final printing. Just export files from Lightroom at 90% quality and Adobe RGB color space. Do all the processing before converting the file to 8 bits and there will be no problem.

If you don't see banding on your monitor after converting to 8-bit, you can be sure everything is okay for printing.

What is the difference between bit depth and color space?

The bit depth determines the number of possible values. The color space defines the maximum values ​​or range (commonly known as "gamma"). If you need to use a box of crayons as an example, a higher bit depth will translate into more shades, and a larger range will translate into richer colors regardless of the number of crayons.

To see the difference, consider the following simplified visual example:

As you can see, increasing the bit depth reduces the risk of color transition stripes. By expanding the color space (wider gamut) we can use more extreme colors.

How does color space affect bit depth?


SRGB (left) and Adobe RGB (right)

Color space (the range in which bits are applied), so a very large gamut could theoretically cause banding associated with color transitions if stretched too much. Remember that bits determine the number of transitions in relation to the color range. Thus, the risk of visually noticeable transitions increases as the gamut expands.

Recommended settings to avoid banding

After all this discussion, you can draw a conclusion in the form of recommendations to follow to avoid problems with color transitions in gradients.

Camera settings:

  • A 14+ bit RAW file is a good choice if you want the best quality, especially if you are looking for hue and brightness adjustments, such as a 3-4 stop increase in shadow brightness.
  • A 12-bit RAW file is great if you want less file size or shoot faster. For the Nikon D850, a 14-bit RAW file is about 30% larger than a 12-bit file, so this is an important factor. And large files can affect the ability to shoot long bursts of frames without overflowing the memory buffer.
  • Never shoot JPG if you can. If you are shooting some kind of events when you need to quickly transfer files and the quality of the images does not matter, then of course Jpeg will be an excellent option. You may also want to consider shooting in JPG + RAW mode if you need a better quality file later. It's worth sticking to the SRGB color space if you're shooting in JPG. If you're shooting RAW, you can ignore the color space settings. RAW files do not actually have a color space. It is not installed until the RAW file is converted to another format.

Lightroom and Photoshop (working files):

  • Always save your working files in 16-bit. Use 8-bit only for final export in JPG format for web and print, if this format meets the requirements of the printing equipment. It is okay to use 8-bit for final output, but this mode should be avoided during processing.
  • Be sure to view the photo at 67% or larger to ensure there are no noticeable color transitions in the gradients. At a smaller scale, Photoshop can create false banding. This will be our other article.
  • Be careful when using HSL in Lightroom and Adobe Camera RAW, as this tool can create color stripes. This has very little to do with bit depth, but problems are possible.
  • If your original file is only available in 8-bit (eg JPG), you should immediately convert it to 16-bit before editing. Subsequent edits to 8-bit images in 16-bit mode will not create too obvious problems.
  • Don't use 32-bit space unless you're using it to combine multiple RAW (HDR) files. There are some limitations when working in 32-bit space, and files become twice as large. Your best bet is to do HDR blending in Lightroom instead of using 32-bit in Photoshop.
  • Lightroom's HDR DNG format is very handy. It uses 16-bit floating point mode in order to cover a wider dynamic range with the same number of bits. Counting on the fact that we usually only need to correct the dynamic range in HDR within 1-2 stops, this is an acceptable format that improves quality without creating huge files. Of course, don't forget to export this RAW in 16-bit TIF / PSD when you need to continue editing in Photoshop.
  • If you are one of the few people who have to use 8-bit for some reason, it is probably best to stick with the sRGB color space.
  • When using the Gradient Tool in Photoshop, by checking the "Anti-Aliasing" option, the program will use 1 extra bit. This can be useful when working in 8-bit files.

Export for internet:

  • JPG with 8 bits and sRGB color space is ideal for the web. While some monitors are capable of displaying higher bit depths, the increased file size is probably not worth it. And while more and more monitors support wider gamuts, not all browsers support color management correctly and may display images incorrectly. And most of these new monitors probably never went through color calibration.
  • 8-bit is fine for final print output, but use 16-bit if your printing equipment supports it.
  • A standard monitor is fine for most tasks, but remember that you may see color gradients due to 8-bit displays. These streaks may not actually be in the pictures. They appear at the stage of displaying on the monitor. The same image may look better on a different display.
  • If you can afford it, the 10-bit display is ideal for photography. A wide range such as Adobe RGB is also ideal. But this is optional. You can create stunning pictures on the most ordinary monitor.

A look into the future

At the moment, choosing a higher bit depth may not matter to you, since your monitor and printer can only operate in 8 bits, but this may change in the future. Your new monitor will be able to display more colors, and you can print on professional equipment. Save your work files in 16-bit. This will be enough to keep the best quality for the future. This will be enough to meet the requirements of all monitors and printers that will appear in the foreseeable future. This range of color is enough to go beyond the range of human vision.

However, gamma is different. Chances are you have a monitor with an sRGB color gamut. If it supports the wider Adobe RGB or P3 gamut, then you're better off working with those gamuts. Adobe RGB has a wider range of colors in blues, cyan and greens, while P3 offers broader colors in reds, yellows, and greens. In addition to P3 monitors, there are commercial printers that exceed the AdobeRGB gamut. sRGB and AdobeRGB are no longer able to capture the full range of colors that can be reproduced on a monitor or printer. For this reason, it is worth using a wider color range if you expect to print or view your images on better printers and monitors later. The ProPhoto RGB gamma is suitable for this. And, as discussed above, a wider gamut needs a higher 16-bit bit depth.

How to remove banding

But if you encounter banding (most likely when converting to an 8-bit image, you can take the following steps to minimize this problem:

  • Convert the layer to a smart object.
  • Add Gaussian Blur. Set the radius to hide the banding. A radius equal to the width of the banding in pixels is ideal.
  • Use a mask to apply blur only where needed.
  • Finally, add some noise. The graininess removes the appearance of smooth blur and makes the image more coherent. If you're using Photoshop CC, use the Camera RAW filter to add noise.
1In the process of converting a raster graphic image, the number of colors decreased from 64 to 8. How many times the volume occupied by

them in memory. Examination on the topic "Computer graphics" Option 2 2Multimedia is A) getting moving images on the display; B) an application program for creating and processing drawings; C) combining high quality images with realistic sound; D) the field of informatics, dealing with the problems of drawing on a computer. 3Choose the correct sequence of stages in the development of computer graphics: a) The emergence of graphic displays; b) Symbolic graphics; c) The advent of plotters; d) The advent of the color printer. A) a, c, d, b; B) b, c, a, d; C) b, a, c, d; D) a, b, d, c. 3. Creation of arbitrary drawings, drawings is engaged in A) scientific graphics; B) design graphics; C) business graphics; D) illustrative graphics. 4. What device of the computer implements the audio sampling process? A) sound card; B) columns; B) headphones; D) processor. 5. A raster image is ... A) a mosaic of very small elements - pixels; B) a combination of primitives; C) a palette of colors. 6. The point of the graphic screen can be colored in one of the colors: red, green, brown, black. How much video memory will be allocated to encode each pixel? A) 4 bits; B) 2 bytes; B) 4 bytes; D) 2 bits; E) 3 bits. 7. The instrument of the GR is: A) Line; B) color; B) sprinkler; D) drawing. 8. The graphic primitive is: A) line; B) an eraser; C) copying; D) color. 9. To obtain a 4-color image for each pixel, it is necessary to allocate A) 1 byte; B) 1 bit; B) 2 bytes; D) 2 bits 10. A discrete signal is ... A) a digital signal; B) the number of measurements made by the device in 1 second; C) the value of a physical quantity continuously changing over time; D) a table with the results of measurements of a physical quantity at fixed times. 11. What is the sampling rate for more accurate sound reproduction? A) 44.1 kHz; B) 11 kHz; B) 22 kHz; D) 8 kHz. 12. What can be attributed to the disadvantages of raster graphics in comparison with vector? A) Large amount of graphic files. B) Photographic image quality. C) Ability to view the image on a graphic display screen. D) Distortion when scaling. 13. What can be attributed to the disadvantages of the LCD monitor? A) light weight; B) dimming when changing the viewing angle; C) absence of e / m radiation; D) small volume. 14Code 1011 is used to encode green. How many colors are in the palette? 15Find the size of the recorded audio quad audio file if it was recorded for 4 minutes, using 16-bit audio coding depth and 32kHz sampling rate. 16 512 bytes of memory were allocated to store a 64-by-64-pixel bitmap. What is the maximum possible number of colors in the image palette? 17 In the process of converting a raster graphic file, the number of colors decreased from 512 to 8. How many times has the information volume of the file decreased?

1) The volume of a stereo audio file is 7500 Kb, the sound depth is 32 bit, the duration of this file is 10 sec. What is the sampling rate

is this file written?
2) The information volume of an image of 30x30 pixels is equal to 1012.5 bytes. Determine the number of colors in the palette used for this image.

Solving problems for encoding graphic information.

Raster graphics.

Vector graphics.

Introduction

This electronic manual contains a group of tasks on the topic "Coding of graphic information". The collection of tasks is divided into types of tasks based on the specified topic. Each type of tasks is considered taking into account a differentiated approach, ie, tasks of the minimum level (grade "3"), general level (grade "4"), advanced level (grade "5") are considered. The given tasks are taken from various textbooks (the list is attached). Solutions of all problems are considered in detail, guidelines are given for each type of problem, and a brief theoretical material is given. For ease of use, the manual contains links to bookmarks.

Raster graphics.

Types of tasks:

1. Finding the amount of video memory.

2. Determining the screen resolution and setting the graphics mode.

3.

1. Finding the amount of video memory

In tasks of this type, the following concepts are used:

· amount of video memory,

· graphic mode,

· color depth,

· screen resolution,

· palette.

In all such problems, it is required to find one or another value.

Video memory - this is a special random access memory in which a graphic image is formed. In other words, to get a picture on the monitor screen, it must be stored somewhere. That's what video memory is for. Most often, its size is from 512 KB to 4 MB for the best PCs with the implementation of 16.7 million colors.


Video memory size calculated by the formula: V =I *X *Y whereI- color depth of a single point, X,Y - dimensions of the screen horizontally and vertically (product x by y - screen resolution).

The display screen can operate in two main modes: text and graphic.

IN graphics mode the screen is divided into separate luminous points, the number of which depends on the type of display, for example 640 horizontally and 480 vertically. The luminous points on the screen are usually called pixels, their color and brightness may vary. It is in the graphic mode that all complex graphic images, created by special programs that control the parameters of each pixel of the screen, appear on the computer screen. Graphic modes are characterized by such indicators as:

- resolution(the number of dots with which the image is displayed on the screen) - typical currently resolution levels are 800 * 600 dots or 1024 * 768 dots. However, for monitors with a large diagonal, a resolution of 1152 * 864 dots can be used.

- color depth(the number of bits used to encode the color of the point), for example, 8, 16, 24, 32 bits. Each color can be considered as a possible point state, Then the number of colors displayed on the monitor screen can be calculated by the formula K=2 I, where K- the number of colors, I- color depth or bit depth.

In addition to the above knowledge, the student should have an idea of ​​the palette:

- palette(the number of colors that are used to reproduce the image), for example 4 colors, 16 colors, 256 colors, 256 shades of gray, 216 colors in a mode called High color or 224, 232 colors in True color mode.

The student should also know the relationship between units of measurement of information, be able to convert from small units to larger ones, KB and MB, use a regular calculator and Wise Calculator.

Level "3"

1. Determine the required amount of video memory for various graphic modes of the monitor screen, if the color depth per point is known. (2.76)

Screen mode

Color depth (bits per point)

Solution:

1. Total dots on the screen (resolution): 640 * 480 = 307200
2. The required amount of video memory V = 4 bits * 307200 = 1228800 bits = 153600 bytes = 150 Kbytes.
3. The required amount of video memory for other graphics modes is calculated in the same way. The student uses a calculator to make calculations to save time.

Answer:

Screen mode

Color depth (bits per point)

150 Kb

300 Kb

600 Kb

900 Kb

1.2 Mb

234 Kb

469 Kb

938 Kb

1.4 Mb

1.8 MB

384 Kb

768 Kb

1.5 Mb

2.25 Mb

640 Kb

1.25 Mb

2,5 Mb

3.75 Mb

2. Black and white (no grayscale) bitmap graphic has a size of 10 ´10 points. How much memory will this image take? (2.6 8 )

Solution:

1. Number of points -100

2. Since only 2 colors are black and white. then the color depth is = 2)

3. The amount of video memory is 100 * 1 = 100 bits

Problem 2.69 is solved in a similar way.

3. To store a bitmap with a size of 128 x 128 pixels allocated 4 KB of memory. What is the maximum possible number of colors in the image palette. (EGE_2005, demo, level A). (See also problem 2.73 )

Solution:

1. Determine the number of points in the image. 128 * 128 = 16384 dots or pixels.

2. The amount of memory for an image of 4 KB is expressed in bits, since V = I * X * Y is calculated in bits. 4KB = 4 * 1024 = 4,096 bytes = 4096 * 8 bits = 32768 bits

3. Find the color depth I = V / (X * Y) = 32768: 16384 = 2

4. N = 2I, where N is the number of colors in the palette. N = 4

Answer: 4

4. How many bits of video memory is occupied by information about one pixel on a b / w screen (without halftones)? (, P. 143, example 1)

Solution:

If the image is B / W without halftones, then only two colors are used - black and white, that is, K = 2, 2i = 2, I = 1 bit per pixel.

Answer: 1 pixel

5. How much video memory is required to store four pages of an image if the bit depth is 24 and the display resolution is 800 x 600 pixels? (, No. 63)

Solution:

1. Let's find the amount of video memory for one page: 800 * 600 * 24 = bits = 1,440,000 bytes = 1406.25 KB ≈1, 37 MB

2.1.37 * 4 = 5.48 MB ≈5.5 MB for storing 4 pages.

Answer: 5.5 MB

Level "4"

6. Determine the amount of video memory of the computer, which is required to implement the graphics mode of the monitor High Color with a resolution of 1024 x 768 pixels and a palette of 65536 colors. (2.48)

If the student remembers that the High Color mode is 16 bits per point, then the amount of memory can be found by determining the number of points on the screen and multiplying by the color depth, i.e. 16. Otherwise, the student can reason like this:

Solution:

1. Using the formula K = 2I, where K is the number of colors, I is the color depth, we determine the color depth. 2I = 65536

The color depth is: I = log = 16 bits (calculated using programsWiseCalculator)

2 .. The number of image points is equal to: 1024 × 768 =

3. The required amount of video memory is: 16 bits ´ = 12 bits = 1572864 bytes = 1536 KB = 1.5 MB ("1.2 MBytes. The answer is given in the workshop Ugrinovich)... We teach students, translating into other units, to divide by 1024, not 1000.

Answer: 1.5 MB

7. In the process of converting a bitmap graphic image, the number of colors decreased from 65536 to 16. How many times will the amount of memory occupied by it decrease? (2.70,)

Solution:

It takes 16 bits to encode 65536 different colors for each point. It only takes 4 bits to encode 16 colors. Consequently, the amount of memory used has decreased 16: 4 = 4 times.

Answer: 4 times

8. Is there enough video memory of 256 KB to operate the monitor in 640 mode ´ 480 and a palette of 16 colors? (2.77)

Solution:

1. Let's find out the amount of video memory that is required to operate the monitor in 640x480 mode and a palette of 16 colors. V = I * X * Y = 640 * 480 * 4 (24 = 16, color depth is 4),

V = 1228800 bits = 153600 bytes = 150 KB.

2. 150 < 256, значит памяти достаточно.

Answer: enough

9. Specify the minimum amount of memory (in kilobytes) sufficient to store any 256 x 256 pixel bitmap image if the image is known to use a palette of 216 colors. You don't need to store the palette itself.

1) 128

2) 512

3) 1024

4) 2048

(ЕГЭ_2005, level А)

Solution:

Let's find the minimum amount of memory required to store one pixel. The image uses a palette of 216 colors, therefore, one pixel can be associated with any of 216 possible color numbers in the palette. Therefore, the minimum amount of memory for one pixel will be equal to log2 216 = 16 bits. The minimum amount of memory sufficient to store the entire image will be 16 * 256 * 256 = 24 * 28 * 28 = 220 bits = 220: 23 = 217 bytes = 217: 210 = 27 KB = 128 KB, which corresponds to item 1.

Answer: 1

10. Graphics modes with color depths of 8, 16. 24, 32 bits are used. Calculate the amount of video memory required to implement these color depths at different screen resolutions.

Note: the task ultimately comes down to solving problem number 1 (level "3", but the student himself needs to remember the standard screen modes.

11. How many seconds does it take for a 28800 bit / s modem to transmit a 640 x 480 pixel color bitmap, assuming the color of each pixel is encoded in three bytes? (ЕГЭ_2005, level В)

Solution:

1. Determine the size of the image in bits:

3 bytes = 3 * 8 = 24 bits,

V = I * X * Y = 640 * 480 * 24 bits = 7372800 bits

2. Find the number of seconds to transfer the image: 7372800: 28800 = 256 seconds

Answer: 256.

12. How many seconds does a modem transmitting messages at 14,400 bps take to transmit an 800 x 600 pixel color bitmap, assuming there are 16 million colors in the palette? (ЕГЭ_2005, level В)

Solution:

16M colors require 3 bytes or 24 bits to encode (Graphics Mode True Color). The total number of pixels in the image is 800 x 600 = 480,000. Since there are 3 bytes per pixel, there are 480,000 * 3 = 1,440,000 bytes or bits per 480,000 pixels. : 14400 = 800 seconds.

Answer: 800 seconds.

13. A modern monitor allows you to get different colors on the screen. How many bits of memory does 1 pixel take? ( , p. 143, example 2)

Solution:

One pixel is encoded by a combination of two characters "0" and "1". We need to find out the length of the pixel code.

2x =, log2 = 24 bit

Answer: 24.

14. What is the minimum amount of memory (in bytes) sufficient to store a black-and-white raster image of 32 x 32 pixels, if it is known that the image uses no more than 16 shades of gray. (USE_2005, level A)

Solution:

1. The color depth is 4 because 16 color gradations are used.

2.32 * 32 * 4 = 4096 bit memory for storing black and white images

3.4096: 8 = 512 bytes.

Answer: 512 bytes

Level "5"

15. The monitor works with 16 color palette in 640 * 400 pixel mode. It takes 1250 KB to encode the image. How many pages of video memory does it take? (Task 2, Test I-6)

Solution:

1.Since the page - a section of video memory that contains information about one screen image of one “picture” on the screen, that is, several pages can be placed in the video memory at the same time, then in order to find out the number of pages, you need to divide the video memory for the entire image by the memory size by 1 page. TO-number of pages, K =Vimage /V1 p

Vimage = 1250 KB by condition

1. To do this, let's calculate the amount of video memory for one page of an image with a 16 color palette and a resolution of 640 * 400.

V1 page = 640 * 400 * 4, where 4 is the color depth (24 = 16)

V1 page = 1024000 bits = 128000 bytes = 125 KB

3. K = 1250: 125 = 10 pages

Answer: 10 pages

16. The video memory page is 16000 bytes. The display operates in a 320 * 400 pixel mode. How many colors are in the palette? (Task 3, Test I-6)

Solution:

1. V = I * X * Y - volume of one page, V = 16000 bytes = 128000 bits by condition. Find the color depth I.

I = 128000 / (320 * 400) = 1.

2. Now let's determine how many colors are in the palette. K =2 I, where K- the number of colors, I- color depth . K = 2

Answer: 2 colors.

17. A color image of size 10 is scanned ´10 cm. Scanner resolution 600 dpi and 32-bit color depth. How much information will the resulting graphic file have? (2.44, , Problem 2.81 is solved in a similar way. )

Solution:

1. A scanner's resolution of 600 dpi (dot per inch) means that the scanner can distinguish 600 dots over a 1-inch line. Let's translate the resolution of the scanner from dots per inch to dots per centimeter:

600 dpi: 2.54 "236 dots / cm (1 inch = 2.54 cm.)

2. Therefore, the size of the image in pixels will be 2360´2360 pixels. (multiplied by 10 cm.)

3. The total number of image points is:

4. The information volume of the file is:

32 bit ´ 5569600 = bit "21 MB

Answer: 21 MB

18. The amount of video memory is 256 Kb. The number of colors used is -16. Calculate the display resolution options. Provided that the number of image pages can be 1, 2 or 4. (, No. 64, p. 146)

Solution:

1. If the number of pages is 1, then the formula V = I * X * Y can be expressed as

256 * 1024 * 8 bits = X * Y * 4 bits, (since 16 colors are used, the color depth is 4 bits.)

i.e. 512 * 1024 = X * Y; 524288 = X * Y.

The ratio between the height and width of the screen for standard modes does not differ and is equal to 0.75. So, to find X and Y, you need to solve the system of equations:

We express X = 524288 / Y, substitute it into the second equation, we get Y2 = 524288 * 3/4 ​​= 393216. Find Y≈630; X = 524288 / 630≈830

630 x 830.

2. If the number of pages is 2, then one page of 256: 2 = 128 KB, i.e.

128 * 1024 * 8 bits = X * Y * 4 bits, i.e. 256 * 1024 = X * Y; 262144 = X * Y.

We solve the system of equations:

X = 262144 / Y; Y2 = 262144 * 3/4 ​​= 196608; Y = 440, X = 600

Resolution option can be 600 x 440.

4. If the number of pages is 4, then 256: 4 = 64; 64 * 1024 * 2 = X * Y; 131072 = X * Y; we solve the system and the screen dot size is 0.28 mm. (2.49)

Solution:

https://pandia.ru/text/78/350/images/image005_115.gif "width =" 180 "height =" 96 src = ">

1. The task is reduced to finding the number of points across the width of the screen. Let us express diagonal size in centimeters... Considering that 1 inch = 2.54 cm, we have: 2.54 cm 15 = 38.1 cm.

2. We define ratio between height and width of the screen Ana for the frequently occurring screen mode of 1024x768 pixels: 768: 1024 = 0.75.

3. We define screen width... Let the screen width be L, and the height h,

h: L = 0.75, then h = 0.75L.

By the Pythagorean theorem we have:

L2 + (0.75L) 2 = 38.12

1.5625 L2 = 1451.61

L ≈ 30.5 cm.

4. The number of dots along the width of the screen is:

305mm: 0.28mm = 1089.

Therefore, the maximum possible screen resolution of the monitor is 1024x768.

Answer: 1024x768.

26. Determine the ratio between the height and width of the monitor screen for different graphics modes. Does this ratio differ for different modes? a) 640x480; b) 800x600; c) 1024x768; a) 1152x864; a) 1280x1024. Determine the maximum possible screen resolution for a 17 "monitor with a screen dot size of 0.25 mm. (2.74 )

Solution:

1. Let's determine the ratio between the height and width of the screen for the listed modes, they hardly differ from each other:

2. Let's express the size of the diagonal in centimeters:

2.54 cm 17 = 43.18 cm.

3. Let's determine the width of the screen. Let the screen width be L, then the height is 0.75L (for the first four cases) and 0.8L for the last case.

By the Pythagorean theorem we have:

Therefore, the maximum possible screen resolution of the monitor is. 1280x1024

Answer: 1280x1024

3. Color and image encoding.

Students use the knowledge gained earlier in the Number System, the translation of numbers from one system to another.

The theoretical material of the topic is also used:

The color bitmap is rendered according to the RGB color model, in which the three base colors are Red, Green, and Blue. The intensity of each color is specified in an 8-bit binary code, which is often expressed in hexadecimal notation for convenience. In this case, the following recording format is used, RRGGBB.

Level "3"

27. Write down the red code in binary, hexadecimal and decimal notation. (2.51)

Solution:

Red corresponds to the maximum value of the intensity of red and the minimum values ​​of the intensities of green and blue base colors , which corresponds to the following data:

Codes / Colors

Red

Green

Blue

binary

hexadecimal

decimal

28. How many colors will be used if 2 levels of brightness gradation are taken for each pixel color? 64 brightness levels of each color?

Solution:

1. In total, for each pixel, a set of three colors (red, green, blue) is used with its own brightness levels (0-on, 1-off). Hence, K = 23 = 8 colors.

Answer: 8; 262 144 colors.

Level "4"

29. Fill in the color table at 24-bit color depth in hexadecimal notation.

Solution:

With a color depth of 24 bits, 8 bits are allocated for each of the colors, that is, 256 intensity levels are possible for each of the colors (28 = 256). These levels are given in binary codes (minimum intensity, maximum intensity). In binary representation, the following shaping of colors is obtained:

Color name

Intensity

Red

Green

Blue

Black

Red

Green

Blue

White

Translated into the hexadecimal number system, we have:

Color name

Intensity

Red

Green

Blue

Black

Red

Green

Blue

White

30. On a "small monitor" with a 10 x 10 raster grid there is a black and white image of the letter "K". Represent the contents of video memory as a bitmap in which the rows and columns correspond to the rows and columns of the raster grid. ( , c. 143, example 4)

9 10

Solution:

To encode an image on such a screen, 100 bits (1 bit per pixel) of video memory is required. Let “1” denote a filled pixel, and “0” not a filled one. The matrix will look like this:

0001 0001 00

0001 001 000

0001 01 0000

00011 00000

0001 01 0000

0001 001 000

0001 0001 00

Experiments:

1. Search for pixels on the monitor.

Arm yourself with a magnifying glass and try to see the triads of red, green and blue (RGB - from English. "Red -Green -Blue ”dots on the monitor screen. (, .)

As the primary source warns us, the results of experiments will not always be successful. The reason is. That there are different technologies for the manufacture of cathode-ray tubes. If the tube is made according to the technology "Shadow mask", then you can see a real mosaic of dots. In other cases, when instead of a mask with holes, a filament system of phosphor of three primary colors is used (aperture grille), the picture will be completely different. The newspaper provides very graphic photographs of three typical pictures that "curious students" can see.

It would be useful for the children to inform that it is desirable to distinguish between the concepts of "screen point" and pixels. The concept of "screen points"- physically real objects. Pixels logical elements of the image. How can this be explained? Let's remember. That there are several typical configurations of the picture on the monitor screen: 640 x 480, 600 x 800 pixels and others. But on the same monitor, you can install any of them .. This means that the pixels are not the dots of the monitor. And each of them can be formed by several neighboring luminous points (in the limit of one). On the command to paint a particular pixel in blue, the computer, taking into account the set display mode, will paint over one or several adjacent points of the monitor. Pixel density is measured as the number of pixels per unit of length. The most common units are referred to for short as (dots per inch - the number of dots per inch, 1 inch = 2.54 cm). The dpi unit is common in computer graphics and publishing. Typically, the pixel density for a screen image is 72 dpi or 96 dpi.

2. Conduct an experiment in a graphics editor if 2 levels of brightness gradation are taken for each pixel color? What colors will you get? Draw up in the form of a table.

Solution:

Red

Green

Blue

Colour

Turquoise

Crimson

Vector graphics:

1. Vector image coding tasks.

2. Getting a vector image using vector commands

In the vector approach, the image is considered as a description of graphic primitives, lines, arcs, ellipses, rectangles, circles, shades, etc. The position and shape of these primitives in the graphic coordinate system are described.

Thus, a vector image is encoded by vector commands, i.e., it is described using an algorithm. A segment of a straight line is determined by the coordinates of its ends, circle - center coordinates and radius, polygon- coordinates of its corners, shaded area- border line and fill color. It is advisable for students to have a vector graphics instruction set table (, p. 150):

Team

Action

Line to X1, Y1

Draw a line from the current position to position (X1, Y1).

Line X1, Y1, X2, Y2

Draw a line with start coordinates X1, Y1 and end coordinates X2, Y2. The current position is not set.

Circle X, Y, R

Draw a circle; X, Y are center coordinates and R is radius length.

Ellipse X1, Y1, X2, Y2

Draw an ellipse bounded by a rectangle; (X1, Y1) are the coordinates of the upper left corner, and (X2, Y2) are the coordinates of the lower right corner of the rectangle.

Rectangle X1, Y1, X2, Y2

Draw a rectangle; (X1, Y1) - coordinates of the upper left corner, (X2, Y2) - coordinates of the lower right corner of the rectangle.

Paint Color Color

Set the current drawing color.

Fill color Color

Set the current fill color

Paint over X, Y, BORDER COLOR

Paint any closed figure; X, Y - coordinates of any point inside the closed shape, BORDER COLOR - color of the boundary line.

1. Tasks for coding a vector image.

Level "3"

1. Describe the letter "K" with a sequence of vector commands.

Literature:

1., Informatics for lawyers and economists, p. 35-36 (theoretical material)

2., Informatics and IT, pp. 112-116.

3. N. Ugrinovich, L. Bosova, N. Mikhailova, Workshop on Informatics and IT, pp. 69-73. (tasks 2.67-2.81)

4. Popular lectures about the device of the computer. - SPb., 2003, pp. 177-178.

5. In search of a pixel or types of cathode-ray tubes. // Informatics. 2002, 347, pp. 16-17.

6.I. Semakin, E Henner, Informatics. Workshop problem book, vol. 1, Moscow, LBZ, 1999, pp. 142-155.

Electronic textbooks:

1., Information in the school computer science course.

2., Reshebnik on the topic "Information Theory"

Tests:

1. Test I-6 (encoding and measurement of graphic information)

Theory

The calculation of the information volume of a raster graphic image (the amount of information contained in a graphic image) is based on counting the number of pixels in this image and on determining the color depth (information weight of one pixel).

The calculations use the formula V = i * k,

where V is the information volume of the raster graphic image, measured in bytes, kilobytes, megabytes;

k is the number of pixels (dots) in the image, which is determined by the resolution of the information carrier (monitor screen, scanner, printer);

i is the color depth, which is measured in bits per pixel.

Color depth given by the number of bits used to encode the color of the point.

Color depth is related to the number of displayed colors by the formula

N = 2 i, where N is the number of colors in the palette, i is the color depth in bits per pixel.

Examples of

1. The video memory of the computer has a volume of 512Kb, the size of the graphic grid is 640 × 200, in the palette of 8 colors. How many pages of the screen can fit in the video memory of the computer at the same time?

Solution:

Let's find the number of pixels in the image of one screen page:

k = 640 * 200 = 128000 pixels.

Let's find i (color depth, i.e. how many bits are required to encode one color) N = 2 i, therefore, 8 = 2 i, i = 3.

We find the amount of video memory required to accommodate one page of the screen. V = i * k (bit), V = 3 * 128000 = 384000 (bit) = 48000 (byte) = 46.875Kb.

Because the amount of video memory of the computer is 512Kb, then you can simultaneously store in the video memory of the computer 512 / 46.875 = 10.923 ≈ 10 whole screen pages.

Answer: 10 full screen pages can be simultaneously stored in the computer's video memory

2. As a result of converting a bitmap graphic image, the number of colors decreased from 256 to 16. How did the amount of video memory occupied by the image change?

Solution:

We use the formulas V = i * k and N = 2 i.

N 1 = 2 i1, N 2 = 2 i2, then V 1 = i 1 * k, V 2 = i 2 * k, therefore,

256 = 2 i1, 16 = 2 i2,

i 1 = 8, i 2 = 4,

V 1 = 8 * k, V 2 = 4 * k.

Answer: the volume of the graphic image will be halved.

3. A color image of a standard A4 size (21 × 29.7 cm 2) is scanned. Scanner resolution 1200dpi (dots per inch) and 24-bit color depth. What information volume will the resulting graphic file have?

Solution:

1inch = 2.54cm

i = 24 bits per pixel;

Let's convert the dimensions of the image into inches and find the number of pixels k: k = (21 / 2.54) * (29.7 / 2.54) * 1200 2 (dpi) ≈ 139 210 118 (pixels)

We use the formula V = i * k

V = 139210118 * 24 = 3341042842 (bits) = 417630355 bytes = 407842Kb = 398Mb

Answer: the size of the scanned graphic image is 398 MB

1. Determine the number of colors in the palette at a color depth of 4, 8, 16, 24, 32 bits.

2. In the process of converting a raster graphic image, the number of colors decreased from 65536 to 16. How many times will the information size of the file be reduced?

3. 256-color drawing contains 120 bytes of information. How many points does it consist of?

4. Is there enough video memory of 256 Kbytes to operate the monitor in 640 × 480 mode with a palette of 16 colors?

5. How much video memory is required to store two pages of an image, assuming the display resolution is 640 × 350 pixels and the number of colors used is 16?

6. How much video memory is required to store four pages of an image if the bit depth is 24 and the display resolution is 800 × 600 pixels?

7. The amount of video memory is 2 MB, bit depth is 24, display resolution is 640 × 480. What is the maximum number of pages that can be used under these conditions?

8. The video memory has a capacity that can store a 4-color image with a size of 640 × 480. What size image can be stored in the same amount of video memory using a 256 - color palette?

9. For storing a raster image with a size of 1024 × 512, 256 KB of memory were allocated. What is the maximum possible number of colors in the image palette?

Tasks for calculating the volume of audio information

Theory

Sound can have different volume levels. The number of different levels is calculated by the formula N = 2 i, where i is the depth of sound.

Sampling rate - the number of measurements of the input signal level per unit of time (for 1 second).

The size of a digital mono audio file is calculated by the formula A = D * T * i,

where D is the sampling rate;

T - time of sounding or sound recording;

i - register capacity (sound depth).

For a stereo audio file, the size is calculated by the formula A = 2 * D * T * i

Solution:

If you are recording a stereo signal

A = 2 * D * T * i = 44100 * 120 * 16 = 84672000bit = = 10584000bytes = 10335.9375Kb = 10.094MB.

If you record a mono signal A = 5Mb.

Answer: 10 Mb, 5 Mb

2. The amount of free memory on the disk - 0.01 GB, the bit depth of the sound card - 16. What is the duration of the sound of a digital audio file recorded with a sampling frequency of 44100 Hz.

Solution:

A = D * T * i

T = 10737418.24 / 44100/2 = 121.74 (sec) = 2.03 (min)

Answer: 2.03 minutes

Tasks for independent solution

1. Determine the size (in bytes) of a digital audio file, the playing time of which is 10 seconds at a sampling rate of 22.05 kHz and a resolution of 8 bits. The file is not compressed.

2. The user has a memory of 2.6 MB at his disposal. You need to record a 1 minute digital audio file. What should be the sampling rate and bit depth?

3. Free disk space - 0.01 GB, sound card capacity - 16. What is the duration of a digital audio file recorded with a sampling rate of 44100 Hz?

4. One minute of digital audio file recording takes 1.3 MB on the disk, sound card capacity - 8. How often is the sound recorded?