16 bit graphics. Basic information about images. Why photographers use JPEG

You may have heard expressions like "8-bit" And "16-bit". When people mention bits, they are talking about how many colors are in an image file. Photoshop color modes determine the bit depth of the image (1, 8, 16 or 32 bits). Since you will be working with these characteristics quite often (for example, when in the dialog box New you also have to choose the number of bits), it is useful to know what these numbers mean.

Bit— the smallest unit of measurement used by computers to store information. Each pixel in an image has bit depth, which controls how much color information a given pixel can contain.

So bit depth image specifies how much color information a given image contains. The higher the bit depth, the more colors can be displayed in an image.

Let's take a brief look at options with different numbers of bits in Photoshop.

1. In color mode, pixels can only be black or white. Images in this mode are called 1-bit, because each pixel can only be one color - black or white.

2. 8-bit image can contain two values ​​in each bit, which equals 256 possible color values. Why 256? Since each of the eight bits can contain two possible values, you get 256 combinations.

With 256 combinations for each channel in an RGB image, you can have over 16 million colors.

3. 16-bit images contain 65536 colors in one channel. They look the same as other images on the screen, but take up twice the space on your hard drive. Photographers love these images because the complementary colors give them more flexibility when adjusting settings. Curves And Levels, even though larger file sizes can greatly slow down the program.

In addition, not all tools and filters work with 16-bit images, but the list of tools that work with them grows with each new version of the program.

4. 32-bit images, which are referred to as High Dynamic Range (HDR) images, contain more colors than you might imagine. But this will be discussed in future articles about HDR.

You'll mostly be dealing with 8-bit images, but if you have a camera that takes pictures at a higher bit depth, by all means, take a day off and experiment to see if the difference in quality is worth sacrificing some space on. hard drive and editing speed.

If you notice an error in the text, select it and press Ctrl + Enter. Thank you!

Today, technologies and devices make it possible to create such a bright and rich image that it will be even more beautiful than its real prototype. The quality of the transmitted image depends on several indicators: the number of megapixels, image resolution, its format, and so on. These include another property - color depth. What is it, and how to define and calculate it?

General information

Color depth is the maximum number of shades of color that an image can contain. This quantity is measured in bits (the number of binary bits that define the color of each pixel and hue in the image). For example, one pixel, the color depth of which is 1 bit, can take on two values: white and black. And the more important the color depth is, the more diverse the image will be, including many colors and shades. She is also responsible for the accuracy of image transmission. Here everything is the same: the higher, the better. As another example, a GIF image with 8-bit color depth will contain 256 colors, while a JPEG image with 24-bit color depth will contain 16 million colors.

A little about RGB and CMYK

As a rule, all images in these formats have a color depth of 8 bits per channel (color). But the image may also contain several color channels. Then the RGB image with three channels will have a depth of 24 bits (3x8). The color depth of CMYK images can reach 32 bits (4x8).

A few more bits

Color depth is the number of shades of the same color that a device in contact with images is capable of reproducing or creating. This parameter is responsible for the smooth transition of shades in images. All digital images are encoded using ones and zeros. Zero - one - white. They are stored and contained in memory, measured in bytes. One byte contains 8 bits, which indicate the color depth. For cameras, there is another definition - the color depth of the matrix. This is an indicator that determines how complete and deep images in terms of shades and colors a camera, or rather its matrix, can produce. Thanks to a high value of this parameter, photographs are voluminous and smooth.

Permission

The link between color depth and image quality is its resolution. For example, a 32-bit image with a resolution of 800x600 will be significantly worse than a similar one with 1440x900. Indeed, in the second case, a much larger number of pixels are involved. It's quite easy to verify this yourself. All you need to do is go to the “image settings” on your PC and try to successively reduce or enlarge. During this process, you will clearly see how much the resolution affects the quality of the transmitted image. Regardless of how many colors a given image contains, it will be limited to the maximum color that the monitor can support. As an example, you can take a monitor with a color depth of 16 bits and an image with 32 bits. This image on such a monitor will be displayed with a color depth of 16 bits.

Visit almost any photography forum and you're bound to come across a discussion regarding the merits of RAW and JPEG files. One of the reasons some photographers prefer the RAW format is the greater bit depth (color depth)* contained in the file. This allows you to produce photos of greater technical quality than what you can get from a JPEG file.

*Bitdepth(bit depth), or Colordepth(color depth, in Russian this definition is more often used) - the number of bits used to represent color when encoding one pixel of raster graphics or a video image. Often expressed in units of bits per pixel (bpp). Wikipedia

What is color depth?

Computers (and devices that are controlled by embedded computers, such as digital SLR cameras) use the binary number system. Binary numbering consists of two digits - 1 and 0 (in contrast to the decimal numbering system, which includes 10 digits). One digit in the binary system is called a “bit” (short for “binary digit”).

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

The maximum possible eight-bit number is 11111111 - or 255 in decimal. This is a significant number for photographers because it occurs in many image processing programs as well as older displays.

Digital shooting

Each of the millions of pixels in a digital photograph corresponds to an element (also called a pixel) on the camera's sensor. These elements, when illuminated by light, generate a small electrical current that is measured by the camera and recorded as a JPEG or RAW file.

JPEG files

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

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

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

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

RAW files

RAW files assign more bits to each pixel (most cameras have 12 or 14 bit processors). More bits mean more numbers, and therefore more tones per channel.

This doesn't equate to more colors - JPEG files can already record more colors than the human eye can perceive. But each color is preserved with a much finer gradation of tones. In this case, the image is said to have greater color depth. The table below illustrates how bit depth equates to number of shades.

In-camera processing

When you set your camera to record photos in JPEG mode, the camera's internal processor reads the information received from the sensor at the moment you take a photo, processes it according to the parameters set in the camera menu (white balance, contrast, color saturation, etc.) etc.) and writes it as an 8-bit JPEG file. All additional information received by the sensor is discarded and lost forever. As a result, you only use 8 bits out of the 12 or 14 possible that the sensor is capable of capturing.

Post-processing

A RAW file differs from a JPEG in that it contains all the data recorded by the camera sensor during the exposure period. When you process a RAW file using RAW conversion software, the software performs conversions similar to what the camera's internal processor does when you shoot in JPEG. The difference is that you set the parameters within the program you are using, and those set in the camera menu are ignored.

The benefit of the RAW file's extra bit depth becomes apparent in post-processing. A JPEG file is worth using if you are not going to do any post-processing and you just need to set the exposure and all other settings while shooting.

However, in reality, most of us want to make at least a few adjustments, even if it's just brightness and contrast. And this is exactly the moment when JPEG files begin to give way. With less information per pixel, when you make adjustments to brightness, contrast, or color balance, tones can appear visually separated.

The result is most obvious in areas of smooth and continuous gradation, such as blue skies. Instead of a soft gradient from light to dark, you will see stratification into bands of color. This effect is also known as posterization. The more you adjust, the more it appears in the image.

With a RAW file, you can make much greater changes to color tone, brightness, and contrast before you see a decrease in image quality. This can also be done by some functions of the RAW converter, such as adjusting the white balance and restoring “highlight” areas (highlight recovery).

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

Upon closer examination, a posterization effect is visible in the sky. Working with a 16-bit TIFF file can eliminate, or at least minimize, the banding effect.

16-bit TIFF files

When you process a RAW file, your software gives you the option to save it as an 8-bit or 16-bit file. If you're happy with the processing and don't want to make any more changes, you can save it as an 8-bit file. You won't notice any differences between an 8-bit and a 16-bit file on your monitor or when you print the image. The exception is if you have a printer that recognizes 16-bit files. In this case, you can get a better result from a 16-bit file.

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

Again, when you have completed the processing process, you can save the file as an 8-bit file. Magazines, book publishers, and stockists (and just about any client who buys photos) require 8-bit images. 16-bit files may only be needed if you (or someone else) intend to edit the file.

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

Here you can see a comparison of the top right corner of the processed JPEG file and the RAW file. Both files were created with the same camera exposure setting, and the only difference between them is the color depth. I was able to “pull out” the “overexposed” details that were not visible in JPEG in the RAW file. If I wanted to work on this image further in Photoshop, I could save it as a 16-bit TIFF file to ensure the highest possible image quality during the processing process.

Why do photographers use JPEG?

Just because not all professional photographers use RAW all the time doesn't mean anything. Both wedding and sports photographers, for example, often work with the JPEG format.

For wedding photographers who may shoot thousands of images at a wedding, this saves time in post-production.

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

Color depth on computer screens

Bit depth also refers to the depth of color that computer monitors are capable of displaying. Readers using modern displays may find this hard to believe, but the computers I used in school could only produce two colors—white and black. The “must-have” computer of that time was the Commodore 64, capable of reproducing as many as 16 colors. According to information from Wikipedia, more than 12 units of this computer were sold.


Commodore 64 computer. Photo by Bill Bertram

Sure, you can't edit photos on a 16-color machine (64K of RAM won't cut it anyway), and the invention of 24-bit true-color displays is one of the things that made digital photography possible. Realistic color displays, like JPEG files, are created using three colors (red, green and blue), each with 256 shades recorded in an 8-bit digit. Most modern monitors use either 24-bit or 32-bit graphics devices with realistic color reproduction.

HDR files

As many of you know, High Dynamic Range (HDR) images are created by combining multiple versions of the same image taken at different exposure settings. But did you know that the software produces a 32-bit image with more than 4 billion tonal values ​​per channel per pixel—merely a leap from the 256 tones in a JPEG file.

True HDR files may not be displayed correctly on a computer monitor or printed page. Instead, they are trimmed down to 8- or 16-bit files using a process called tone-mapping, which preserves the high dynamic range characteristics of the original image but allows it to be reproduced on low dynamic range devices.

Conclusion

Pixels and bits are the basic elements for constructing a digital image. If you want to get the best possible image quality from your camera, you need to understand the concept of color depth and the reasons why the RAW format produces better quality images.

Image bit depth is a common question. We'll tell you which option to prefer and why more bits is not always the caseFine.

The standard opinion on this matter is that the more bits, the better. But do we really understand the difference between 8-bit and 16-bit images? Photographer Nathaniel Dodson explains the differences in detail in this 12-minute video:

More bits, Dodson explains, means you have more freedom to work with colors and tones before artifacts such as banding appear in the image.

If you shoot in JPEG, you're limited to a bit depth of 8 bits, which allows you to work with 256 color levels per channel. The RAW format can be 12-, 14-, or 16-bit, with the latter offering 65,536 levels of color and tone—meaning much more freedom in post-processing the 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 a 16-bit image.

To visualize the difference between an 8-bit and a 16-bit image, think of the former as a building 256 feet tall—that's 78 meters. The height of the second “building” (16-bit photo) will be 19.3 kilometers - that’s 24 Burj Khalifa towers stacked on top of each other.

Note that you can't simply open an 8-bit image in Photoshop and “convert” it to 16-bit. By creating a 16-bit file, you give it enough “space” to store 16 bits of information. By converting an 8-bit image to a 16-bit image, you will end up with 8 bits of unused “space”.


JPEG: no detail, poor color, RAW: not much detail

But the extra depth means a larger file size—meaning the image will take longer to process and also require more storage space.

Ultimately, it all depends on how much freedom you want to have in post-processing your photos, as well as the capabilities of your computer.

IN raster images to represent them, a rectangular grid of image elements (pixels) is used. Each pixel has a specific location and color value. When working with raster images, you edit pixels, not objects or shapes. Raster images are the most common way to convey non-rasterized images such as photographs or digital drawings because they convey subtle gradations of color and tone most effectively.

Raster images are resolution-dependent, meaning they contain a fixed number of pixels. When the screen is magnified too much, or when printing at a lower resolution than the original resolution, details are lost and edges become jagged.

Example of a raster image with different magnification levels


Bitmap images sometimes require a lot of disk space to store, so they often require compression to reduce file size when used in some Creative Suite components. For example, before an image is imported into a layout, it is compressed in the application where it was created.

Note.

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

About vector images

Vector images (sometimes called vector shapes or vector objects) consist of lines and curves given vectors- mathematical objects that describe an image in accordance with its geometric characteristics.

Vector images can be freely moved and resized without losing detail or clarity because they are resolution-independent. Their edges remain crisp when resized, printed on a PostScript printer, saved to a PDF file, or imported into a vector graphics application. Thus, vector images are the best choice for illustrations that are displayed on various media and that need to be resized frequently, such as logos.

Examples of vector images include objects created in Adobe Creative Suite using the drawing tools and shape tools. Using copy and paste commands, you can use the same vector objects in different Creative Suite components.

Combination of vector and raster images

When using a combination of vector and raster images in one document, be aware that the image does not always look the same on the screen and on the final media (printed in a print shop, on a printer, or published on a web page). The quality of the final image is influenced by the following factors:

Transparency

Numerous effects are implemented in images using partially transparent pixels. If your image contains transparent areas, Photoshop performs a process called mixing. In most cases, the default mixing process works great. But if the image contains complex intersecting areas and must be output at high resolution, then a test review of the convergence results may be necessary.

Image Resolution

The number of pixels per inch (ppi) in a raster image. Using too low a resolution when preparing an image for printing results in draft- images with large, spot-like pixels. Using a resolution that is too high (where the pixels are smaller than the minimum dot size that can be rendered 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 lineature

The number of dots per inch (dpi) and the number of lines per inch (lpi) in a halftone screen. The relationship between image resolution, printer resolution, and screen lineature determines the quality of detail in the printed image.

Color channels

Each Photoshop image contains one or more channels, each of which stores information about the color elements of the image. The number of default color channels used in an image depends on the color mode. By default, bitmap, grayscale, duotone, and indexed color images contain one channel, RGB and Lab images contain three channels, and CMYK images contain four channels. Channels can be added to all types of images except bitmaps. For more information, see Color Modes.

Color image channels are actually grayscale images, each representing a different color component of the image. For example, an RGB image contains separate channels for red, green, and blue.

In addition to color channels, you can include alpha channels, which are used as masks for saving and editing selections, and spot ink channels, which are used to add spot colors when printing. For more information, see Channel Basics.

Bit depth

Bit depth determines the amount of color information available for each pixel in an image. The more bits of color information allocated to each pixel, the greater the number of colors available and the more accurate their display. For example, an image with a bit depth of 1 contains pixels with two possible color values: black and white. An 8 bit depth image can contain 2 8 or 256 different color values. Grayscale images with a bit depth of 8 can contain 256 different gray values.

RGB images are composed of three color channels. An RGB image with a bit depth of 8 can contain 256 different values ​​for each channel, meaning that a total of more than 16 million color values ​​can be represented. RGB images with 8-bit channels are sometimes called 24-bit images (8 bits x 3 channels = 24 bits of data per pixel).