Solving problems on coding graphic information. Determining the number of colors in a palette How to find the number of colors in an image

Solving coding problems graphic information.

Raster graphics.

Vector graphics.

Introduction

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

Raster graphics.

Types of tasks:

1. Finding the amount of video memory.

2. Determining screen resolution and setting graphics mode.

3.

1. Finding the amount of video memory

In tasks of this type the following concepts are used:

· video memory volume,

· graphics mode,

· color depth,

· screen resolution,

· palette.

In all such problems, you need to find one or another quantity.

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


Video memory capacity calculated by the formula: V=I*X*Y, whereI– color depth of an individual point, X,Y – screen dimensions horizontally and vertically (the product of x and y is the screen resolution).

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

IN graphic 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. Glowing dots 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 the computer appear on the computer screen. special programs, which control the parameters of each pixel of the screen. Graphic modes are characterized by such indicators as:

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

- color depth(number of bits used to encode the color of a dot), e.g. 8, 16, 24, 32 bits. Each color can be considered as a possible state of a point. Then the number of colors displayed on the monitor screen can be calculated using the formula K=2 I, Where K– number of flowers, I– color depth or bit depth.

In addition to the knowledge listed above, 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 must also know the connections between units of measurement of information, be able to convert from small units to larger ones, Kbytes and Mbytes, use a regular calculator and Wise Calculator.

Level "3"

1. Determine the required amount of video memory for different graphics modes monitor screen, if the color depth per dot is known. (2.76)

Screen mode

Color depth (bits per dot)

Solution:

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

Answer:

Screen mode

Color depth (bits per dot)

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) raster graphic image has a size of 10 ´10 points. How much memory will this image take up?(2.6 8 )

Solution:

1. Number of points -100

2. Since there are only 2 colors: 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 of size 128 x 128 pixels took up 4 KB of memory. What is the maximum possible number of colors in the image palette. (USE_2005, demo, level A). (See also Problem 2.73 )

Solution:

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

2. The amount of memory for a 4 KB image can be expressed in bits, since V=I*X*Y is calculated in bits. 4 KB=4*1024=4096 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 does information about one pixel on a b/w screen (without halftones) take?(, P. 143, example 1)

Solution:

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

Answer: 1 pixel

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

Solution:

1. Find the amount of video memory for one page: 800*600*24= bits = 1440000 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 computer video memory that is necessary to implement the monitor’s graphic mode High Color with a resolution of 1024 x 768 pixels and a color palette of 65536 colors. (2.48)

If the student remembers that the High Color mode is 16 bits per dot, then the amount of memory can be found by determining the number of dots 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 pixels is: 1024´768 =

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

Answer: 1.5 MB

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

Solution:

To encode 65536 different colors for each point, 16 bits are needed. To encode 16 colors, only 4 bits are needed. Consequently, the amount of memory occupied has decreased by 16:4=4 times.

Answer: 4 times

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

Solution:

1. Find out the amount of video memory that will be 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) required to store any 256 x 256 pixel bitmap image if you know the image uses a palette of 216 colors. There is no need to store the palette itself.

1) 128

2) 512

3) 1024

4) 2048

(USE_2005, level A)

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 point number 1.

Answer: 1

10. Graphic 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 No. 1 (level “3”, but the student himself needs to remember the standard screen modes.

11. How many seconds will it take for a modem transmitting messages at 28800 bps to transmit a color bitmap image of 640 x 480 pixels, assuming that the color of each pixel is encoded in three bytes? (USE_2005, level B)

Solution:

1. Determine the image volume 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 transmit an image: 7372800: 28800=256 seconds

Answer: 256.

12. How many seconds will it take for a modem transmitting messages at a speed of 14400 bps to transmit a color bitmap image measuring 800 x 600 pixels, assuming that there are 16 million colors in the palette? (USE_2005, level B)

Solution:

To encode 16 million colors, 3 bytes or 24 bits are required (True Color graphics mode). The total number of pixels in the image is 800 x 600 = 480000. Since there are 3 bytes per 1 pixel, then for 480,000 pixels there are 480,000 * 3 = 1,440,000 bytes or bits. : 14400 = 800 seconds.

Answer: 800 seconds.

13. A modern monitor allows you to see 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 pixel code length.

2x =, log2 =24 bits

Answer: 24.

14. What is the minimum amount of memory (in bytes) sufficient to store a black-and-white raster image measuring 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 bits of memory for storing black and white images

3. 4096: 8 = 512 bytes.

Answer: 512 bytes

Level "5"

15. The monitor works with a 16 color palette in 640*400 pixels mode. Encoding an image requires 1250 KB. How many pages of video memory does it take up? (Task 2, Test I-6)

Solution:

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

Vimage = 1250 KB according to condition

1. To do this, let's calculate the amount of video memory for one image page 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. A video memory page is 16,000 bytes. The display operates in 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 according to the condition. Let's find the color depth I.

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

2. Let us now determine how many colors are in the palette. K =2 I, Where K– number of flowers, I– color depth . K=2

Answer: 2 colors.

17. A color image of size 10 is scanned ´10 cm. Scanner resolution 600 dpi and color depth 32 bits. What information volume will the resulting graphic file have? (2.44, , problem 2.81 is solved similarly )

Solution:

1. A scanner resolution of 600 dpi (dots per inch) means that in a 1-inch segment the scanner is able to distinguish 600 dots. Let's convert the scanner resolution from dots per inch to dots per centimeter:

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

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

3. The total number of image pixels is:

4. The information volume of the file is:

32 bits ´ 5569600 = bits » 21 MB

Answer: 21 MB

18. The amount of video memory is 256 KB. The number of colors used is 16. Calculate 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 from each other and is equal to 0.75. This means that to find X and Y, you need to solve the system of equations:

Let's express X=524288/Y, substitute it into the second equation, we get Y2 =524288*3/4=393216. Let's find Y≈630; X=524288/630≈830

630 x 830.

2. If the number of pages is 2, then one page with a volume 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

The resolution option could 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 point 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 problem comes down to finding the number of dots across the width of the screen. Let's express diagonal size in centimeters. Considering that 1 inch = 2.54 cm, we have: 2.54 cm 15 = 38.1 cm.

2. Let's define ratio between screen height and width ana for the frequently used screen mode 1024x768 pixels: 768: 1024 = 0.75.

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

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

According to 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 across the screen width is:

305 mm: 0.28 mm = 1089.

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

Answer: 1024x768.

26. Determine the relationship between the height and width of the monitor screen for various 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" diagonal monitor with a screen dot size of 0.25 mm. (2.74 )

Solution:

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

2. Let's express the diagonal size 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.

According to the Pythagorean theorem we have:

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

Answer: 1280x1024

3. Color and image coding.

Students use the knowledge acquired previously Number systems, converting numbers from one system to another.

Theoretical material of the topic is also used:

A color raster image is formed in accordance with the RGB color model, in which the three basic colors are Red, Green and Blue. The intensity of each color is specified in 8-bit binary code, which is often expressed in hexadecimal notation for convenience. In this case, the following record format is RRGGBB.

Level "3"

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

Solution:

Red color corresponds to the maximum value of the intensity of the red color and the minimum values ​​of the intensities of the green and blue basic 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 for each color?

Solution:

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

Answer: 8; 262,144 colors.

Level "4"

29. Fill out 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 color, i.e. for each color there are 256 intensity levels possible (28 = 256). These levels are specified in binary codes (minimum intensity, maximum intensity). In binary representation, the following color formation is obtained:

Color name

Intensity

Red

Green

Blue

Black

Red

Green

Blue

White

Converting to 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 bit matrix in which the rows and columns correspond to the rows and columns of the raster grid. ( , p.143, example 4)

9 10

Solution:

Encoding the image on such a screen requires 100 bits (1 bit per pixel) of video memory. Let "1" mean a filled pixel, and "0" mean an unfilled pixel. 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 this. What exist different technologies manufacturing cathode ray tubes. If the tube is made using technology "shadow mask" then you can see a real mosaic of dots. In other cases, when instead of a mask with holes, a system of phosphor threads of three primary colors is used (aperture grille), the picture will be completely different. The newspaper provides very visual photographs of three typical paintings that “curious students” can see.

It would be useful for the guys to be informed that it is advisable to distinguish between the concepts of “screen points” and pixels. The concept of "screen points"- physically really existing objects. Pixels- logic gates Images. How can this be explained? Let's remember. That there are several typical image configurations on a monitor screen: 640 x 480, 600 x 800 pixels and others. But you can install any of them on the same monitor. This means that pixels are not monitor points. And each of them can be formed by several neighboring luminous points (within one). Upon command to color one or another pixel blue, the computer, taking into account the set display mode, will color one or more adjacent points on the monitor. Pixel density is measured as the number of pixels per unit length. The most common units are called briefly as (dots per inch - the number of dots per inch, 1 inch = 2.54 cm). The dpi unit is generally accepted in the field computer graphics and publishing. Typically, the pixel density for a screen image is 72 dpi or 96 dpi.

2. Conduct an experiment in graphic editor what if for each pixel color there are 2 levels of brightness gradation? What colors will you receive? Present it in the form of a table.

Solution:

Red

Green

Blue

Color

Turquoise

Crimson

Vector graphics:

1. Vector image coding tasks.

2. Getting a vector image using vector commands

With 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 vector image encoded by vector commands, that is, described using an algorithm. A straight line segment is determined by the coordinates of its ends, circle – center coordinates and radius, polygon– coordinates of its corners, shaded area- border line and shading color. It is advisable for students to have a command system table vector graphics (, 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 the coordinates of the center, and R is the length of the radius.

Ellipse X1, Y1, X2,Y2

Draw an ellipse bounded by a rectangle; (X1, Y1) are the coordinates of the upper left, 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.

Drawing Color Color

Set the current drawing color.

Fill color Color

Set current fill color

Fill X, Y, BORDER COLOR

Shade arbitrary closed figure; X, Y – coordinates of any point inside a closed figure, BORDER COLOR – color of the boundary line.

1. Vector image coding tasks.

Level "3"

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

Literature:

1., Computer Science for Lawyers and Economists, p. 35-36 (theoretical material)

2. , Computer Science and IT, pp. 112-116.

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

4. Popular lectures on computer design. – St. Petersburg, 2003, pp. 177-178.

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

6. I. Semakin, E Henner, Computer Science. Problem book-workshop, vol. 1, Moscow, LBZ, 1999, pp. 142-155.

Electronic textbooks:

1. , Information in the school computer science course.

2. , A workbook on the topic “Information Theory”

Tests:

1. Test I-6 (Coding and Measuring Graphic Information)

Bit depth is one of the parameters that everyone is chasing, but few photographers really understand it. Photoshop offers 8, 16, and 32-bit file formats. Sometimes we 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 measurement relating to the storage of information in the form of 1 or 0. One bit can only have 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 useful.

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

So "bit depth" defines the smallest changes you can make relative to some range of values. If our brightness scale 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 a photograph. But if we have enough bits, we have enough wide-range gray steps to create what we'll see as a perfectly smooth black-to-white gradient.

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

How to understand bit depth?

It would be convenient if all the "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 in black and white. A color image is typically made up of red, green, and blue pixels to create color. Each of these colors is processed as a "channel" by the computer and monitor. Software, such as Photoshop and Lightroom, count the number of bits per channel. So 8 bit means 8 bits per channel. This means that an 8-bit RGB photo 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 have 48 bits per pixel, etc.

You might assume that 16-bit means 16-bits per channel in Photoshop, but that's not how it works in this case. Photoshop actually uses 16 bits per channel. However, it treats 16-bit snapshots differently. It simply adds one bit to the 15-bits. This is sometimes called 15+1 bits. 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 from a quality standpoint, it would be fair to say that Adobe's 16-bit mode actually only contains 15-bit. 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 Adobe developer Chris Cox, it allows Photoshop to work 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 it does 12 or 14 bit? On the one hand, this would require a lot of resources for Photoshop work and changing file formats to support other 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's no immediate visual difference. But most importantly, there are huge benefits to using a file format with a few extra bits (as we'll discuss later).

For displays, the terminology changes. Manufacturers want their equipment's performance to sound enticing. Therefore, 8-bit display modes are usually labeled as "24-bit" (because you have 3 channels with 8-bit each). In other words, "24-bit" ("True Color") for a monitor isn't very impressive, it really means the same thing as 8-bit for Photoshop. A better option would be "30-48 bit" (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 may find banding in a 9-bit gradient that contains 2048 shades of gray on a good display that supports deeper color display. The 9-bit gradient is extremely weak, barely perceptible. If you didn't know about its existence, you wouldn't see it. And even when you look at it, it won't be easy to tell where the boundaries of each color are. The 8-bit gradient is relatively easy to see if you look at it closely, although you may still not notice it unless you look closely. So we can say that a 10-bit gradient is visually identical to a 14-bit or deeper one.

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 created in 12-bit. The program doesn't have a 16-bit option for Photoshop's gradient tool, but 12-bit is more than enough for any practical work, since it allows 4096 values.

Don't forget to enable anti-aliasing in the Gradient panel as this is best for testing.

It's also important to note that you will likely experience false banding when viewing images at less than 67% magnification.

Why use more bits than you can see?

Why do we have options even greater 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 photos, previously hidden differences can easily come to light.

If we lighten the shadows significantly or darken the highlights, we will increase some of the dynamic range. And then any shortcomings will become more obvious. In other words, increasing the contrast in an image works like decreasing the bit depth. If we turn up the settings too much, 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 shadows.

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

When converting a 16-bit image to 8-bit, you won't see any difference. If so, then why use 16-bit?

It's all about the fluidity of editing. When working with curves or other tools, you'll get more tonal and color correction steps. Transitions will be smoother in 16 bits. So even if the difference may not be noticeable initially, moving to a lower 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 in will result in a loss of just over 4 bits. A change of 3 stops of exposure is closer to a loss of 2 bits. How often do you have to adjust your exposure that much? When working with RAW, correction up to +/- 4 stops is an extreme and rare situation, but it does happen, so it is advisable to have an additional 4-5 bits above the visible ranges to have a margin. With a normal range of 9-10 bits, with a margin the norm can be approximately 14-15 bits.

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

  • There are not many situations where you will encounter the perfect gradient. Clear blue skies are probably the most common example. All other situations have a lot of detail and the color transitions are not smooth, so you won't see the difference when using different bit depths.
  • Your camera's precision 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 in post-processing by using Gaussian blur and adding noise.
  • A large supply of bits is needed only for extreme tonal corrections.

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 react to light differently. The human eye is more sensitive to shadow.

An interesting fact is that a lot depends on the program you use for post-processing. For example, extruding 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 the Adobe analogue. So, if you draw in LR, you can count on 5 stops, but in CO, you can expect only 4.

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

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 bits even if your source file is 8 bits, such as JPG images. The 16-bit mode will give better results because it will minimize transitions during editing.

There's no point in using 32-bit mode unless you're processing an HDR file.

How many bits does the Internet need?

The advantages of 16 bits include increased editing capabilities. Converting the final edited image to 8-bit is great for viewing snapshots and has the benefit of creating smaller files for the web for faster loading. Make sure anti-aliasing is turned on in Photoshop. If you use Lightroom to export to JPG, anti-aliasing is used automatically. This helps add a bit of noise, which should minimize the risk of noticeable 8-bit color transitions.

How many bits are needed for printing?

If you print at home, you can simply create a copy of the working 16-bit file and process it for printing, printing the actual working file. But what if you send your images over the Internet to a lab? Many people will use 16-bit TIF files, and this is a great way to go. However, if printing requires a JPG or you want to send a file smaller size, you may encounter questions about moving to 8-bit.

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

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

If you don't see banding on your monitor after converting to 8-bit, you can rest assured that everything is fine for printing.

What is the difference between bit depth and color space?

The bit depth determines the number of possible values. A color space defines maximum values ​​or range (commonly known as "gamma"). If you were to use a box of crayons as an example, greater bit depth would be expressed as more shades, and greater range would be expressed as more rich colors regardless of the number of pencils.

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

As you can see, by increasing the bit depth we reduce the risk of color banding. 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 it is stretched too far. Remember that bits define the number of transitions relative to the color range. Thus, the risk of getting visually noticeable transitions increases with the expansion of the gamut.

Recommended settings to avoid banding

After all this discussion, we can come to a conclusion in the form of recommendations that should be followed to avoid problems with color transitions in gradients.

Camera settings:

  • 14+ bit RAW file is good choice, if you want, the best quality, especially if you're counting on tone and brightness adjustments, such as increasing the brightness in the shadows by 3-4 stops.
  • A 12-bit RAW file is great if you want smaller files or want to shoot faster. For Nikon cameras D850 14-bit RAW file is about 30% larger than 12-bit, so this is an important factor. And large files can affect the ability to shoot long bursts of shots without overflowing the memory buffer.
  • Never shoot in JPG if you can help it. If you are filming some events, when you need to quickly transfer files and the quality of the images does not matter, then of course Jpeg will be excellent option. You may also want to consider shooting in JPG+RAW mode if you need a higher quality file later. It's worth sticking to the SRGB color space if you're shooting in JPG. If you're shooting in RAW, you can ignore the color space settings. RAW files don't 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 bits only for final export to JPG format for the Internet and print, if this format meets the requirements of printing equipment. It is fine to use 8-bit for the final output, but this mode should be avoided during processing.
  • Be sure to view your photo at 67% or larger to ensure there are no noticeable color shifts in the gradients. On a smaller scale, Photoshop can create false banding. This will be our next article.
  • Be careful when using HSL in Lightroom and Adobe Camera RAW, as this tool can create color bands. This has very little to do with bit depth, but problems are possible.
  • If your source file is only available in 8-bit (such as a 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 the files become twice as large. It's best to do HDR merging in Lightroom instead of using 32-bit mode in Photoshop.
  • Lightroom's HDR DNG format is very convenient. It uses 16-bit floating point mode in order to cover a wider dynamic range with the same number of bits. Considering that we typically only need to correct dynamic range within 1-2 stops in HDR, this is an acceptable format that improves quality without creating huge files. Of course, don't forget to export this RAW as a 16-bit TIF/PSD when you need to continue editing in Photoshop.
  • If you're one of the few people who must use an 8-bit operating mode for some reason, it's probably best to stick with the sRGB color space.
  • When using the gradient tool in Photoshop, checking the "smooth" option will cause the program to use 1 extra bit. This can be useful when working in 8-bit files.

Export for the Internet:

  • JPG with 8 bits and sRGB color space is ideal for the web. While some monitors are capable of displaying greater bit depth, 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 have probably never been color calibrated.
  • 8-bit is great for final print output, but use 16-bit if the printing equipment supports it.
  • A standard monitor will work fine for most tasks, but remember that you may see color banding due to 8-bit displays. These stripes may not actually be in the pictures. They appear at the stage of output to the monitor. The same photo may look better on a different display.
  • If you can afford it, a 10-bit display is ideal for photography work. A wide range such as Adobe RGB is also ideal. But this is optional. You can create amazing photos on a very ordinary monitor.

A look into the future

IN this moment Choosing a higher bit depth may not matter to you since your monitor and printer are only capable of 8 bits, but this may change in the future. Your new monitor will be able to display more colors, and printing can be done using professional equipment. Save your work files in 16-bit. This will be enough to maintain 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 sufficient to exceed the range of human vision.

However, gamma is different. You most likely have a monitor with an sRGB color gamut. If it supports the wider Adobe RGB spectrum or the P3 gamut, then you're better off working with those gamuts. Adobe RGB has a wider range of colors in blue, cyan and green, while P3 offers wider colors in red, yellow and green. 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's worth using a wider color range if you expect to print or view your photos on better printers and monitors later. The ProPhoto RGB gamma is suitable for this. And, as discussed above, a wider gamut needs a greater bit depth of 16-bit.

How to remove banding

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

  • Convert the layer to a smart object.
  • Add a Gaussian blur. Set the radius to hide the banding. A radius equal to the banding width in pixels is ideal.
  • Use a mask to apply blur only where needed.
  • Finally, add some noise. Grain eliminates the look smooth blur and makes the photo more complete. If you're using Photoshop CC, use the Camera RAW filter to add noise.

When choosing flowers, every person thinks about how many flowers should be in the bouquet. Indeed, in addition to the type and shade of plants, their number also plays a big role in the bouquet. With the help of special developments, scientists were able to find out that already in the 5th - 6th centuries BC, certain numerical symbolism was observed. This fact suggests that numbers have a long-proven meaning, so the number of flowers for a gift must be taken seriously.

Even and odd numbers

According to ancient Slavic traditions, an even number of flowers in a bouquet has the meaning of mourning and charges the bouquet with negative energy.

That is why paired quantities are brought to funerals, graves or monuments. But residents of Eastern, European countries and the USA have a completely different point of view on this matter. An even number is a symbol of luck, happiness and love.

The Germans consider eight to be the happiest number in a bouquet, despite the fact that it is even.

In the USA, 12 flowers are most often given to each other. Residents of Tokyo will be calm if you give them 2 flowers, the main thing is not 4 - this number is considered a symbol of death.

The Japanese, in general, have their own language of plants, and each number has its own meaning. For example, one rose is a sign of attention, three is respect, five is love, seven is passion and adoration, nine is admiration. The Japanese present a bouquet of 9 flowers to their idols, and a bouquet of 7 to their beloved women. In our country, you can also give an even number of plants if there are more than 15 of them in one set.

Language of flowers

Few people know that the language of flowers determines the number of buds in a bouquet. This language needs to be known and taken into account by the one who gives the gift, so as not to regret their actions in the future. Suddenly the number of flowers in the bouquet matters to the recipient.

What do the numbers say?

An exception to the rule that prohibits presenting an even number of flowers is roses, there can even be two of them.

There is a separate language for these beautiful plants that defines the meaning for each number:

How to give roses to a girl

Of course, every woman dreams of receiving a large number of roses from her beloved at least once in her life, which would be difficult to even count.

But a composition of hundreds of elite plants is not always more important in terms of love for your chosen one than one beautiful red rose, especially if it is presented correctly.

You should not wrap the flower in a wrapper, or add extra twigs and plants to it, this will only cheapen its appearance.

A rose decorated with a velvet or satin ribbon will look much better. Sometimes you can pack it in a transparent wrapper, but only without unnecessary shine. The same can be said about a bouquet of three buds. If there are more than 7 flowers in the set, then they must be packaged and tied with ribbons so that the bouquet has beautiful view and didn't fall apart.

Between the number of colors assigned to a bitmap point and the amount of information that needs to be allocated to store the color of a point, there is a dependence determined by the relation (R. Hartley’s formula):

Where

I– amount of information

N the number of colors assigned to the point.

So, if the number of colors specified for an image point is N= 256, then the amount of information required for its storage (color depth) in accordance with R. Hartley’s formula will be equal to I= 8 bits.

Computers use various graphic modes of the monitor to display graphic information. It should be noted here that in addition to the graphic mode of the monitor, there is also a text mode, in which the monitor screen is conventionally divided into 25 lines of 80 characters per line. These graphics modes are characterized by the monitor's screen resolution and color quality (color depth).

To implement each of the graphic modes of the monitor screen, a specific information volume of video memory computer (V), which is determined from the relation

Where

TO– the number of image points on the monitor screen (K = A B)

A– number of horizontal dots on the monitor screen

IN– number of vertical dots on the monitor screen

I– amount of information (color depth), i.e. number of bits per 1 pixel.

So, if the monitor screen has a resolution of 1024 by 768 pixels and a palette consisting of 65536 colors, then

color depth will be I = log 2 65 538 = 16 bits,

the number of image pixels will be equal to K = 1024 x 768 = 786432

The required information volume of video memory will be equal to V = 786432 16 bits = 12582912 bits = 1572864 bytes = 1536 KB = 1.5 MB.

Files created from raster graphics, involve storing data about each individual point in the image. To display raster graphics, complex mathematical calculations are not required; it is enough to simply obtain data about each point of the image (its coordinates and color) and display them on the computer monitor screen.

When ordering printing on bags, it is recommended to apply simple images in no more than one to three colors. It is worth noting that when a good designer creates a layout, this will not in any way affect the quality and consumer perception of the advertising information provided, and in addition, it will reduce the cost and time of order production. You should also take into account the possibility of combining colors technologically and select the appropriate equipment. After all, not all applied images are geometrically independent of each other; often some colors are rigidly related to each other and need to be joined.

If you still need a drawing with big amount different colors, it is better to use special equipment that allows you to perform full color printing on bags. The principle of such machines is the presence of ultraviolet drying, since only UV-curable inks can be used for full-color printing. Of course this technology This implies not only the high cost of applying full-color images to the package, but also printing larger dots, so you should not expect the quality of the image as on paper.