16 colors how many bits. The concept of a bit depth in photoshop

IN raster images For their presentation, a rectangular grid is used from the image elements (pixels). Each pixel corresponds to a certain location and color value. When working with raster images, pixels are edited, not objects or figures. Raster images are the most common way to transfer such unpropered images, like photographs or digital drawings, since it allows you to most effectively transmit fine gradations of color and tones.

Raster images depend on permission, that is, they contain a fixed amount of pixels. With a strong magnification on the screen or when printing with a resolution below, the parts are lost, and the edges become uneven.

Example of a bitmap with varying degrees of increase


Sometimes it takes a lot of space on the disk to store raster images, so to reduce the size of the files when used in some Creative Suite components, such images often require compression. For example, before importing the image in the layout, it is compressed in the application where it was created.

Note.

In Adobe Illustrator, you can create graphic raster effects for drawings using effects and graphics styles.

Details about vector images

Vector images (Sometimes called vector figures or vector objects) consist of lines and curves specified vectors - mathematical objects that describe the image in accordance with its geometrical characteristics.

Vector images can be freely moved and modified without loss of detail and clarity, since such images do not depend on the resolution. Their edges remain clear when changing the size, printing on the PostScript printer, saving in the PDF file, as well as when importing into an application for working with vector graphics. Thus, vector images are the best choice for illustrations that are displayed on various media and the size of which have to change frequently, for example logos.

As an example of vector images, you can bring objects that are created in Adobe Creative Suite tools for drawing and tools of figures. Using the copy and inserts commands, you can use the same vector objects in various Creative Suite components.

Combination of vector and raster images

When used in one document, the combination of vector and raster images should be remembered that the image does not always look the same on the screen and on the final media (printed in the printing house or on the printer or published on the web page). The following factors affect the quality of the final image:

Transparency

Numerous effects are implemented in images using partially transparent pixels. If the image contains transparent areas, before exporting or printing Photoshop performs a process called blind. In most cases, the default information process works perfectly. But if the image contains complex intersecting areas and must be removed with high resolution, then the control of the results may be required.

Image resolution

The number of pixels per inch (PPI) in the raster image. Using too low permission when preparing an image for printing leads to the creation chernovik - Images with large pixels similar to stains. Use too high resolution (when the pixel size is less than the minimum size of the point, which can be played by the output device) increases the file size without improving the quality of the final image and slows down the printing process.

Printer resolution and raster lineture

The number of inch points (DPI) and the number of lines per inch (LPI) in the halftone raster. The ratio between the resolution of the image, the resolution of the printer and the raster linate, determines the quality of the printed image detail.

Color Channels

Each photoShop image contains one or more channelsEach of which stores information about the color elements of the image. The number of color channels used by default depends on the color mode. By default, the image in the bit mode, the grayscale mode, the duotone mode and the mode of indexed colors contain one channel, the images in the RGB and Lab modes contain three channels, and the images in CMYK mode are four channels. Channels can be added to the images of all types, except for bit. For more information, see Color Modes.

Channels of color images are in reality by halftones, each of which represents a separate color component of the image. For example, the image in RGB mode contains separate channels for red, green and blue.

In addition to color channels, you can enable the image alpha ChannelsUsed as masks to save and edit selection, as well as mixture paint channels that are used to add mix colors when printing. For more information, see Channel Information section.

Bit depth

Bit depth Defines the amount of color information available to each pixel image. The more bits of color information on each pixel, the greater the number of available colors and more accurately display them. For example, an image from a bit depth 1 contains pixels with two possible color values: black and white. The image from the bit depth 8 may contain 2 8 or 256 different color values. Images in gray gradation mode with bit depth 8 may contain 256 different gray values.

RGB images are made up of their three color channels. The RGB image with a bit depth 8 may contain 256 different values \u200b\u200bfor each channel, that is, more than 16 million color values \u200b\u200bcan be presented. RGB images with 8-bit channels are sometimes referred to as 24-bit images (8 bits x 3 channel \u003d 24 data bits per pixel).

Visit almost any photo forum, and you will certainly come across the discussion regarding the benefits of RAW and JPEG files. One of the reasons why some photographers prefer RAW format is a greater bit depth (color depth) * contained in the file. This allows you to receive photos of more technical quality than those that you can get from the JPEG file.

*Bit.depth (bits depth), or Colordepth (Color depth, in Russian, it is more common that this definition is used) - the number of bits used to represent the color when encoding a single pixel of raster graphics or video images. Often it is expressed by a unit of bits per pixel (eng. Bits Per Pixel, BPP). Wikipedia.

What is the color depth?

Computers (and devices that are managed by embedded computers, such as digital SLR cameras) use a binary calculus system. Binary numbering consists of two digits - 1 and 0 (in contrast to the decimal calculus system, including 10 digits). One digit in the binary calculus system is called "Bit" (English "Bit", abbreviated from "Binary Digit", "binary digit").

The eight-bit number in the binary system looks like this: 10110001 (equivalent to 177 in the decimal system). The table below demonstrates how it works.

The maximum possible eight-bit number is 11111111 - or 255 in the decimal version. This is a significant digit for photographers, since it arises in many programs for processing images, as well as in old displays.

Digital shooting

Each of the millions of pixels on the digital photography corresponds to the element (also called "Pixel", English. "Pixel") on the sensor (sensory matrix) of the camera. These elements, when they hit them, light generate a weak electric current measured by the camera and recorded in JPEG or RAW file.

JPEG files

JPEG files record information about color and brightness for each pixel three eight-bit numbers, one-number for red, green and blue channels (these color channels are the same as those that you see when building a color histogram in Photoshop or on your camera).

Each eight-bit channel records color on a scale of 0-255, providing a theoretical maximum in 16.777,216 shades (256 x 256 x 256). The human eye can distinguish about about 10-12 million colors, so this number provides more than a satisfactory amount of information to display any object.

This gradient was saved in a 24-bit file (8 bits per channel), which is enough to transmit soft gradation of colors.

This gradient was saved as a 16-bit file. As you can see, 16 bits are not enough to transmit a soft gradient.

Raw files

RAW files assign more bits each pixel (most chambers have 12 or 14-bit processors). More bits are greater than the number, and therefore more tones per channel.

This is not equal to more colors - JPEG files can already write more colors than can perceive the human eye. But each color is preserved with a much finest gradation of tones. In this case, it is said that the image has a greater color depth. The table below illustrates how the bits depth equates to the number of shades.

Processing inside the chamber

When you configure the camera to record photos in JPEG mode, the internal camera processor reads the information received from the sensor at the time when you make a picture, processes it in accordance with the parameters displayed in the chamber menu (white balance, contrast, color saturation, etc. d.), and writes it as a 8-bit JPEG file. All additional information obtained by the sensor is discarded and is lost forever. As a result, you use only 8 bits of 12 or 14 possible, which sensor is able to fix.

Postposting

The RAW file differs from JPEG in what contains all the data recorded by the camera sensor over the exposure period. When you process the RAW file using the RAW conversion software, the program performs conversion similar to that it makes the internal camera processor when you are shooting in JPEG. The difference is that you set the parameters within the program used, and those that are set in the camera menu are ignored.

The benefit from the additional depth of the RAW bit file becomes apparent with postprocessing. JPEG file should be used if you are not going to make any post processing and you just need to expose the exposure and all other settings during shooting.

However, in reality, most of us want to make at least a few patches if it is even just brightness and contrast. And this is exactly the moment when JPEG files begin to give up. With fewer information on the pixel when you adjust the brightness, contrast or color balance, shades can be visually divided.

The result is most obvious in the areas of a smooth and long transition of shades, such as on the blue sky. Instead of a soft gradient from light to dark, you will see a bundle on the color stripes. This effect is also known as the post office (eng. Posterisation). The more you adjust, the stronger it is manifested in the image.

With the RAW file, you can make much stronger changes in the shade of color, brightness and contrast before you see a decrease in image quality. It also allows you to make some RAW-converter functions, such as the white balance setting and the recovery of "cross-section" areas (Highlight Recovery).

This photo is obtained from the JPEG file. Even with this size, the bands are visible in the sky as a result of post-processing.

With careful consideration in the sky, the effect of the posting is visible. Working with a 16-bit TIFF file can eliminate, or at least minimize, the effect of the strips.

16-bit TIFF Files

When you process the RAW file, your software provides you with the option to save it as 8 or a 16-bit file. If you are satisfied with processing and do not want to make any other changes, you can save it as an 8-bit file. You will not notice any differences between the 8 bits file and 16 bits on your monitor or when you print the image. Exception is the case when you have a printer that recognizes 16-bit files. In this case, from the file 16 bits you can get the best result.

However, if you plan to perform post-processing in Photoshop, then it is recommended to save an image as a 16-bit file. In this case, the image obtained from a 12 or 14-bit sensor will be "stretched" to fill out a 16-bit file. After that, you can work on it in Photoshop, knowing that the additional color depth will help you achieve maximum quality.

Again, when you completed the processing process, you can save the file as an 8-bit file. Logs, publishers of books and drains (and almost any client, buying photos), require 8-bit images. Files 16 bits may be required only if you (or someone else) intend to edit the file.

This is an image that I got using the RAW + JPEG setting on the EOS 350D camera. The camera has saved two versions of the file - JPEG, processed by the camera processor, and the RAW file containing all the information recorded by a 12-bit camera sensor.

Here you see a comparison of the right upper angle of the processed JPEG file and the RAW file. Both files were created by the camera with the same exposure setting, and the only difference between them is the depth of color. I was able to "pull out" the details in the RAW file are not distinguishable in JPEG. If I wanted to work on this image further in Photoshop, I could save it as a 16-bit TIFF file to ensure the maximum possible image quality during the processing process.

Why do photographers use JPEG?

The fact that not all professional photographers use the RAW format all the time, nothing else means. Both wedding and sports photographers, for example, often work with JPEG format.

For wedding photographers who can remove thousands of pictures at a wedding, it saves time on subsequent processing.

Sports photographers use JPEG files in order to be able to send photos to their graphic editors during the event. In both cases, speed, efficiency and smaller size of the JPEG format files makes the use of this type of files logical.

Color depth on computer screens

The depth of the bit also refers to the color depth, which computer monitors are capable of displaying. The reader using modern displays may be hard to believe it, but the computers that I enjoyed at school could only reproduce 2 colors - white and black. "Must-had" computer of that time - Commodore 64, capable of reproducing as much as 16 colors. In accordance with the information from Wikipedia, more than 12 units of this computer were sold.


Computer Commodore 64. By photos of Bill Bertram (Bill Bertram)

Undoubtedly, you will not be able to edit photos on the machine with 16 colors (64 Kb of RAM in any case, no longer pulled), and the invention of 24-bit displays with realistic color reproduction is one of the things that have made a digital photo possible. Displays with realistic color performance, as well as JPEG files, are formed using three colors (red, green and blue), each with 256 shades recorded in an 8-bit number. Most modern monitors use either 24-bit, or 32-bit graphic devices with realistic color reproduction.

HDR files

Many of you know that images with an extended dynamic range (HDR) are created by combining multiple versions of the same image taken with different exposure settings. But you know that the software generates a 32-bit image with more than 4 billion tonal values \u200b\u200bto each channel on the pixel - just a jump compared to 256 shades in the JPEG file.

Real HDR files cannot be correctly displayed on a computer monitor or printed page. Instead, they are cut to 8 or 16-bit files using a process called tone compression (eng. Tone-Mapping), which saves the characteristics of the original image with an extended dynamic range, but allows you to play it on devices with a narrow dynamic range.

Conclusion

Pixels and bits are the main elements for building a digital image. If you want to get the most good picture of the picture on your camera, you need to understand the concept of color depth and the reasons for which the RAW format allows you to get a better quality image.

One of the most important parameters of the digital image when photographing is the color depth (Color Depth), or color bothery. You may have already met this parameter, but not everyone gives him due value. Let's see what it is, why it is necessary and how to live with it.

Theory

Let's start as always with a small theoretical entry, because a good theory gives an understanding of the processes taking place in practice. And the understanding is the key to a qualitative and controlled result.

So, we are dealing with a computer, and in computers, as you know, all paths lead to binary code, or zeros and units. But how much we can use zeros and units to determine the color we also say color. For greater clarity we will analyze on the example.

Below you can see a one-bit image. The colors in it are defined only by one digit that can take a value of 0 or 1, which means black and white, respectively.

Color depth - 1 bit

Now go to the step above, to 2-bit images. Here, the color is already determined at once with 2 digits, and here all possible combinations: 00, 01, 10, 11. So, with 2-bit color, we have already have 4 possible colors.

Color depth - 2 bits

Similarly, the number of possible colors increases with each step, and in the 8-bit image already equals 256 colors. At first glance, it seems to be normal, especially since 256 colors are only one channel, and we have them 3. As a result, it gives 16.7 million colors. But then you will make sure that it is not enough for serious processing of this.

16 bit color (and in fact in Photoshop this is 15 bits + 1 color) gives us 32769 colors on a channel or 35 trillion colors total. Do you feel the difference? For a human eye, this is absolutely not noticeable ... As long as we do not throw a bunch of filters on our image.

What will happen?

Take a black and white gradient as an initial example.
To quickly and simply simulate the result of heavy processing, add 2 layers of Levels with the following parameters:

Layers Levels.

And here we will get such a result with different depth of color of the original image:

Gradient after applying filters

As you can see the upper 8-bit gradient, it became clearly striped, while the 16-bit retained a smooth transition (if you do not have a very high-quality monitor, a small band may be observed in the lower gradient). A similar effect of losing smooth color transitions is called posting.

In real photos, the posting may also appear on various gradients, in particular - in the sky. Here is an example of the extiring on the real image, the area is cut off the area where the effect is most noticeable.

Postering in photos

What to do?

Always make sure that your source images for processing were 16-bit. But keep in mind, the image of an image of 8 bits in 16 no useful effect will not give, since additional color information in such an image is originally absent.
How to configure converting photos from the RAW format in a 16-bit image in Adobe Camera Raw applications, Adobe Photoshop Lightroom and DXO Optics Pro, see the video below.

Image bothery frequent stroke. We tell what option preferred and why more bits are not alwaysoK.

Standard opinion on this account - the more bits, the better. But do we really understand the difference between 8-bit and 16-bit images? Nathaniel Dodson photographer explains the differences in this 12-minute video:

More bits, explains Dodson, means that you have more freedom when working with flowers and colors before the appearance of various artifacts in the image, such as banding ("Libracy").

If you are shooting in JPEG, then limit yourself a bit depth of 8 bits, which allows you to work with 256 levels of color to each channel. The RAW format can be 12-, 14- or 16-bit, while the last option gives 65,536 levels of colors and tones - that is, much more freedom with post-converting image. If you count in colors, then you need to multiply the levels of all three channels. 256x256x256 ≈ 16.8 million colors for an 8-bit image and 65 536x65 536x65 536 ≈ 28 billion colors for 16-bit.

To clearly imagine the difference between the 8-bit and 16-bit image, imagine the first as a 256 feet tall building - it is 78 meters. The height of the second "building" (16-bit photo) will be 19.3 kilometers - this is 24 towers of Burj Khalifa, put one on the other.

Please note that it is impossible to simply open an 8-bit image in Photoshop and "turn" it into a 16-bit one. By creating a 16-bit file, you give it enough "space" to store 16 bits of information. Converting an 8-bit image into a 16-bit, you will receive 8 bits unused "space".


JPEG: No details, bad color, Raw: Not many parts

But additional depth means a larger file size - that is, the image will be processed longer, and also requires more storage space.

Ultimately, it all depends on what degree of freedom you want to have pictures of images, as well as from the capabilities of your computer.

Color depth

Color depth (The quality of color reproduction, image bothery) is the term of computer graphics, meaning the amount of memory in the amount of bits used to store and represent the color when encoding one pixel raster graphics or video image. Often expressed unity bit on pixel (eng. BPP - bits. Per Pixel) .

  • 8-bit picture. With a large amount of bits in the color view, the number of displayed colors is too large for the color palette. Therefore, with great depth of color, brightness of red, green and blue components are encoded - such coding is the RGB model.
  • 8-bit color In computer graph - the method of storing graphics information in RAM or in the image file, when each pixel is encoded by one byte (8 bits). The maximum number of colors that can be displayed simultaneously - 256 (28).

8-bit formats

Indexed color. IN indexed (palette ) Mode from a wide color space, any 256 colors are selected. Their meanings R, G. and IN stored in a special table - palette. In each of the pixels of the image, the colors in the palette is stored - from 0 to 255. 8-bit graphic formats are effectively compressed by images in which up to 256 different colors. Reducing the number of colors is one of the methods of compression with losses.

The advantage of indexed colors consists in high quality of the image - wide color coverage is combined with low memory consumption.

Black and white palette. 8-bit black and white image - from black (0) to white (255) - 256 grades of gray.

Uniform palettes. Another format of representation of 8-bit colors is a description of the red, green and blue component with low bit. This form of color representation in computer graph is usually called 8-bit TrueColor. or homogeneous palette (eng. uniform Palette) .

12-bit color Color is encoded by 4 bits (16 possible values) for each R-, G- I. B. -Sut, which allows to represent 4096 (16 x 16 x 16) of various colors. Such a color depth is sometimes used in simple devices with color displays (for example, in mobile phones).

HighColor, or Hicolor Designed to represent the entire set of shades perceived by the human eye. Such a color is encoded by 15 or 16 bits, namely: 15-bit color uses 5 bits to represent the red component, 5 - for green and 5 - for blue, i.e. 25 - 32 possible values \u200b\u200bof each color, which give 32 768 (32 × 32 × 32) combined colors. A 16-bit color uses 5 bits to represent the red component, 5 - for blue and (since the human eye is more sensitive when the green tones perceive) 6 bits for the presentation of green - 64 possible values, respectively. Total 65 536 (32 × 64 × 32) colors.

LCD. Displays. . Most of the modern LCD displays map 18-bit color (64 χ 64 χ 64 \u003d 262 144 combinations). Difference S. trueColor displays are compensated by the flicker of the color of the pixels between their closest colors in the 6-bit bit and (or) the inconspicuous eye dizering (eng. dITHERING. ), In which the missing colors are compiled from the existing mixing them.

TrueColor. 24-bit image. TrueColor. Provides 16.7 million different colors. Such a color is closest to human perception and convenient for image processing. 24-bit trueColor. The set uses 8 bits to represent the red, blue and green components, 256 different color representation options for each channel, or only 16,777,126 colors (256 × 256 × 256).

32-bit color - incorrect description of color depth. 32-bit color is 24-bit ( TrueColor. ) With an optional 8-bit channel, which determines the transparency of the image for each pixel.

SVSRH-TrueColor. In the late 1990s. Some high-grade graphic systems began to use more than 8 bits per channel, for example 12 or 16 bits.