Color gradations and resolution of the output device. Convert the image to black and white: Grayscale Make an image 256 grayscale

© 2014 site

Bit depth or color depth of a digital image is the number of binary digits (bits) used to encode the color of a single pixel.

It is necessary to distinguish between terms bits per channel(bpc – bits per channel) and bits per pixel(bpp – bits per pixel). The bit depth for each of the individual color channels is measured in bits per channel, while the sum of the bits everyone channels is expressed in bits per pixel. For example, an image in the Truecolor palette has a bit depth of 8 bits per channel, which is equivalent to 24 bits per pixel, because the color of each pixel is described by three color channels: red, green and blue (RGB model).

For an image encoded in a RAW file, the number of bits per channel is the same as the number of bits per pixel, because before interpolation, each pixel obtained using a matrix with a Bayer color filter array contains information about only one of the three primary colors.

In digital photography, it is common to describe bit depth primarily in terms of bits per channel, and therefore, when talking about bit depth, I will mean exclusively bits per channel, unless explicitly stated otherwise.

Bit depth determines the maximum number of shades that can be present in the color palette of a given image. For example, an 8-bit black and white image can contain up to 2 8 =256 shades of gray. A color 8-bit image can contain 256 gradations for each of the three channels (RGB), i.e. total 2 8x3 =16777216 unique combinations or color shades.

High bit depth is especially important for correctly displaying smooth tonal or color transitions. Any gradient in a digital image is not a continuous change in tone, but is a stepwise sequence of discrete color values. A large number of gradations creates the illusion of a smooth transition. If there are too few halftones, the gradation is visible to the naked eye and the image loses its realism. The effect of causing visually distinct color jumps in areas of the image that originally contained smooth gradients is called posterization(from the English poster - poster), since a photograph that lacks halftones becomes similar to a poster printed using a limited number of colors.

Bit depth in real life

To clearly illustrate the material presented above, I will take one of my Carpathian landscapes and show you how it would look with different depths. Remember that increasing the bit depth by 1 bit means doubling the number of shades in the image palette.

1 bit – 2 shades.

1 bit allows you to encode only two colors. In our case it is black and white.

2 bits – 4 shades.

With the advent of halftones, the image ceases to be just a set of silhouettes, but still looks quite abstract.

3 bits – 8 shades.

The foreground details are already visible. The striped sky is a good example of posterization.

4 bits – 16 shades.

Details begin to appear on the mountain slopes. In the foreground, the posterization is almost invisible, but the sky remains striped.

5 bits – 32 shades.

Obviously, low contrast areas that require a lot of close midtones to display are the ones that suffer the most from posterization.

6 bit – 64 shades.

The mountains are almost fine, but the sky still looks stepped, especially closer to the corners of the frame.

7 bit – 128 shades.

I have nothing to complain about - all the gradients look smooth.

8 bit – 256 shades.

And here you have the original 8-bit photo. 8 bits are quite enough for realistic transmission of any tonal transitions. On most monitors you won't notice a difference between 7 and 8 bits, so even 8 bits may seem overkill. But still, the standard for high-quality digital images is precisely 8 bits per channel, in order to cover the ability of the human eye to distinguish color gradations with a guaranteed margin.

But if 8 bits are enough for realistic color rendering, then why might a bit depth greater than 8 be needed? And where does all this noise about the need to save photos at 16 bits come from? The fact is that 8 bits are enough to store and display a photograph, but not to process it.

When editing a digital image, tonal ranges can be both compressed and stretched, causing values ​​to be constantly discarded or rounded, and eventually the number of midtones can fall below the level needed to render tonal transitions smoothly. Visually, this is manifested in the appearance of the same posterization and other artifacts that hurt the eyes. For example, brightening the shadows by two stops stretches the brightness range by a factor of four, meaning that edited areas of an 8-bit photo will look as if they were taken from a 6-bit image, where the shading is very noticeable. Now imagine that we are working with a 16-bit image. 16 bits per channel means 2 16 = 65535 color gradations. Those. we can freely throw away most of the midtones and still get tonal transitions that are theoretically smoother than in the original 8-bit image. The information contained in 16 bits is redundant, but it is this redundancy that allows you to carry out the most daring manipulations with a photograph without visible consequences for image quality.

12 or 14? 8 or 16?

Typically, a photographer is faced with the need to decide on the bit depth of a photograph in three cases: when choosing the bit depth of a RAW file in the camera settings (12 or 14 bits); when converting a RAW file to TIFF or PSD for subsequent processing (8 or 16 bits) and when saving the finished photo for an archive (8 or 16 bits).

Shooting in RAW

If your camera allows you to choose the bit depth of the RAW file, then I definitely recommend that you prefer the maximum value. Usually you have to choose between 12 and 14 bits. The extra two bits will only slightly increase the size of your files, but it will give you more freedom when editing them. 12 bits allow you to encode 4096 brightness levels, while 14 bits allow you to encode 16384 levels, i.e. four times more. Due to the fact that I carry out the most important and intensive transformations of the image precisely at the processing stage in the RAW converter, I would not want to sacrifice a single bit of information at this critical stage for future photography.

Convert to TIFF

The most controversial stage is the moment of converting the edited RAW file into 8- or 16-bit TIFF for further processing in Photoshop. Quite a few photographers will advise you to convert exclusively to 16-bit TIFF, and they will be right, but only if you are going to do deep and comprehensive processing in Photoshop. How often do you do this? Personally, I don’t. I do all the fundamental transformations in a RAW converter with a 14-bit non-interpolated file, and use Photoshop only for polishing the details. For such little things as spot retouching, selective lightening and darkening, resizing and sharpening, 8 bits are usually sufficient. If I see that a photo needs aggressive processing (we're not talking about collages or HDR), it means that I made a serious mistake in the RAW file editing stage, and the smartest thing to do would be to go back and fix it instead of rape an innocent TIFF. If the photo contains some delicate gradient that I still want to correct in Photoshop, then I can easily switch to 16-bit mode, carry out all the necessary manipulations there, and then return to 8 bits. The image quality will not be affected.

Storage

To store already processed photos, I prefer to use either 8-bit TIFF or JPEG, saved at maximum quality. I am driven by the desire to save disk space. 8-bit TIFF takes up half the space of 16-bit, and JPEG, which in principle can only be 8-bit, even at maximum quality is about half the size of 8-bit TIFF. The difference is that JPEG compresses images with lossy data, while TIFF supports lossless compression using the LZW algorithm. I don't need 16 bits in the final image because I'm not going to edit it anymore, otherwise it simply wouldn't be final. Some little thing can be easily corrected in an 8-bit file (even if it’s a JPEG), but if I need to do global color correction or change the contrast, I’d rather turn to the original RAW file than torture an already converted photo, which even in the 16-bit version it does not contain all the information necessary for such conversions.

Practice

This photo was taken in a larch grove near my home and converted using Adobe Camera Raw. Opening the RAW file in ACR, I will enter an exposure compensation of -4 EV, thereby simulating 4 stops of underexposure. Of course, no one in their right mind makes such mistakes when editing RAW files, but we need to use a single variable to achieve a perfectly mediocre conversion, which we will then try to correct in Photoshop. I save the fairly darkened image twice in TIFF format: one file with a bit depth of 16 bits per channel, the other - 8.

At this stage, both images look the same black and are indistinguishable from each other, so I am only showing one of them.

The difference between 8 and 16 bits becomes noticeable only after we try to brighten photographs, while stretching the brightness range. To do this I will use levels (Ctrl/Cmd+L).

The histogram shows that all the tones of the image are concentrated in a narrow peak, pressed against the left edge of the window. To brighten the image, it is necessary to cut off the empty right side of the histogram, i.e. change the white point value. Taking the right input level slider (the white point), I pull it close to the right edge of the flattened histogram, thereby giving the command to distribute all gradations of brightness between the untouched black point and the newly designated (15 instead of 255) white point. Having performed this operation on both files, we will compare the results.

Even at this scale, 8-bit photography looks grainier. Let's increase it to 100%.

16 bits after brightening

8 bits after lightening

The 16-bit image is indistinguishable from the original, while the 8-bit image is severely degraded. If we were dealing with real underexposure, the situation would be even sadder.

Obviously, such intensive transformations as brightening a photo by 4 stops are really better done on a 16-bit file. The practical significance of this thesis depends on how often you have to correct such a marriage? If often, then you're probably doing something wrong.

Now let's imagine that I saved a photo as an 8-bit TIFF, as usual, but then suddenly decided to make some radical changes to it, and all my backup RAW files were stolen by aliens.

To simulate destructive but potentially reversible editing, let's look again at levels.

I enter 120 and 135 into the Output Levels cells. Now, instead of the available 256 gradations of brightness (from 0 to 255), useful information will only occupy 16 gradations (from 120 to 135).

The photo predictably turned grey. The image is still there, just the contrast has decreased by 16 times. Let's try to correct what we have done, for which we will again apply the levels to the long-suffering photograph, but with new parameters.

Now I changed the Input Levels to 120 and 135, i.e. moved the black and white points to the edges of the histogram to stretch it over the entire brightness range.

The contrast has been restored, but the posterization is noticeable even on a small scale. Let's increase it to 100%.

The photo is hopelessly damaged. The 16 halftones remaining after crazy editing are clearly not enough for an at least somewhat realistic scene. Doesn't this mean that 8 bits are really of no use? Don’t rush to jump to conclusions—the decisive experiment is yet to come.

Let's return again to the untouched 8-bit file and transfer it to 16-bit mode (Image>Mode>16 Bits/Channel), after which we will repeat the entire procedure of desecrating the photo, according to the protocol described above. After the contrast has been barbarically destroyed and then restored again, we will convert the image back to 8-bit mode.

Is everything okay? What if we increase it?

Flawless. No posterization. All operations with levels took place in 16-bit mode, which means that even after reducing the brightness range by 16 times, we were left with 4096 gradations of brightness, which was more than enough to restore the photo.

In other words, if you have to do important editing of an 8-bit photo, turn it into 16-bit and work as if nothing had happened. If even such absurd manipulations can be carried out with an image without fear of consequences for its quality, then even more so it will calmly survive the expedient processing to which you can actually subject it.

Thank you for your attention!

Vasily A.

Post scriptum

If you found the article useful and informative, you can kindly support the project by making a contribution to its development. If you didn’t like the article, but you have thoughts on how to make it better, your criticism will be accepted with no less gratitude.

Please remember that this article is subject to copyright. Reprinting and quoting are permissible provided there is a valid link to the source, and the text used must not be distorted or modified in any way.

Evgeny Kuznetsov

I have repeatedly met people who believe that the higher the screen resolution when printing graphic images, the higher the output quality of the publication. In this article I would like to shed a little light on this, since the issue is quite non-trivial and requires discussion :).

First, let's define the concepts. In this article I will use several terms, understanding the meaning of which is necessary for the correct perception of the article’s materials.

dpi - dots per inch - resolution that determines the number of microdots of a particular output device (be it a printer or phototypesetting machine) per unit of length (usually per inch). In fact, this parameter determines the size of the minimum dot that can be printed. The higher this parameter, the correspondingly smaller the size of the minimum point can be. The usual value of this parameter is from 600-800 to 2400-2540 or more dpi.

lpi - lineature - the number of raster dots per inch - a parameter that determines the density of raster lines per unit length (this is also usually a linear inch) in the original after it has undergone the screening process. This resolution should be significantly less than the dpi resolution (why - described later in this article), and is usually 100, 133, 150, 175 or 200 lpi. That is, the raster dot is usually much larger than the minimum dot that can be reproduced on a given device.

Gradation is a shade of the same color. For example, the term "grayscale" can mean any color from black to white, such as 50 percent gray.

Well, now let’s try to understand everything in detail and thoroughly.

Probably, each of you has seen and visually compared for yourself images printed on newsprint and images printed in albums on high-quality coated or glossy paper. The first thing that catches your eye when viewing them (at least what catches your eye :) is the use of different sizes of raster dots in printing. When printing newspaper products, low lineature values ​​are usually used (less than 100, 100, or 133 lines per inch), and when producing higher-quality prints, correspondingly higher values ​​are used (150, 175 or more). Depending on the properties of the paper, the quality of the printing press and some other factors, there are optimal parameters that vary from one printing house to another (depending on the equipment they use), but in general, the higher the lineature, the more image detail can be convey in print. The test image below shows a screen simulation using different lineatures.

Rice. 1a. Example of screening using 60 lpi lineature

Rice. 1b. Example of screening using 100 lpi lineature

Rice. 1st century Example of screening using 150 lpi lineature

Rice. 1 year Example of screening using 200 lpi lineature

However, printing with higher lineatures imposes a number of requirements on the paper, the printing press, and even on the resolution of the phototypesetting machine, therefore, the great importance of lineatures is not always a good thing. Usually, too high a lineature and, accordingly, too small halftone dots create the effect of a more “contrast” print - the light areas of the image become lighter (usually due to problems with copying processes), and the dark ones merge into dies where shadow details disappear. As a result, the image begins to suffer from a lack of shades. Within the framework of this article, only the influence of the resolution of a phototypesetting machine on the quality of transmission of raster dots, and, consequently, the shades of the image, is considered. That is, we consider what is determined at the last stage of pre-press preparation - at photo output.

The resolution of a phototypesetting machine (or other output device) is a parameter that determines the maximum possible number of microdots reproduced per unit length. Typically, the higher this value, the better - accordingly, the more dots that can be printed, the finer the shapes of the elements can be reproduced. In this case, the subtlety of the form means the correctness and smoothness of the contours of the raster dot, and their display with minimal discreteness. The image below shows highly enlarged 30% density elliptical dots with a 45 degree screen angle (black ink), taken from a real image that was screened at 150 lines per inch, using various (indicated in the image captions) resolutions phototypesetting machine.

Rice. 2a. Shape of a raster dot at a resolution of 600 dpi

Rice. 2b. Shape of a raster dot at a resolution of 1200 dpi

Rice. 2c. Shape of a raster dot at a resolution of 1800 dpi

Rice. 2g. Shape of a raster dot at a resolution of 2400 dpi

From the figures it is clear that the shape and correctness of the outlines of a single raster dot depends entirely on the output resolution of the phototypesetting machine (or another output device, the same printer). Well, the better the quality of the raster dot is reproduced, the greater the number of elements (microdots) it is built with, the greater the number of colors or gradations it can convey, because the color in any place on the print depends mainly on the size of the raster dot (and a little on the degree of whiteness of the paper and on the presence or absence of varnish. And of course, also on the printing conditions). Mathematically, the formula for calculating the number of gradations possible for given values ​​of lineature and resolution in dpi is written as follows:

The formula is extremely simple and understandable, and one is added to the total number of gradations to take into account a color in which there are no halftone dots (i.e., the color of the paper is usually white). By doing some simple calculations, we can determine how the resolution of the phototypesetting machine determines the output number of gradations at the output. Below is a table for four different phototypesetter resolutions and output lineatures. At the same time, it is indicated what the maximum number of gradations can be obtained under given conditions.

Output lineature, lpi Available number of gradations, VOT(Variables of Tone)
1200 2400 3600 4800
60 400 1600 3600 6400
80 225 900 2000 3600
100 140 550 1200 2300
120 100 400 900 1600
133 80 320 730 1300
150 65 256 570 1025
175 48 180 420 750
200 37 145 325 577
225 29 110 256 450
250 24 93 205 360

In this case, it is assumed that the resolution of the phototypesetting device (printer) in both directions of film exposure (printing) is the same. If the resolutions are different, the root mean square of both resolutions is calculated and substituted into the above formula. The table shows that when printing using the same resolution, in general, an increase in the lineature leads to significant losses in the transmission of color shades, which can be observed in practice when printing with high lineatures with not high enough resolution.

How many gradations can be considered sufficient? Most raster files use a color depth per color channel of 8 bits per image pixel. If there are three channels, as in the additive RGB model, then the total color depth will be 24 bits per pixel, and if four channels are used, as in the subtractive CMYK model, then the color depth of all of them will be 32 bits. Thus, one pixel in one color channel can have one of 2 to the 8th power (256) states that determine its color. Ideally, the output device should provide the same 256 brightness levels, or, in relation to printing, 256 different states of raster dots (no more). This, of course, does not always happen, and no device, as a rule, reproduces all 256 gradations. But the operating parameters of the output resolution in dpi should always be specified “with a margin”, which will ensure a sufficient level of quality and reduce the impact of various errors on print quality. Thus, the optimal dpi resolution for printing with 150th lineature is 2400 dpi, resolution for lineatures 175 and 200, as well as 225 - 3600 dpi. Specifying large resolution values ​​to obtain an even greater number of gradations is not only useless (since you will not be able to visually distinguish such a large number of shades; the value of 256 is already the “ceiling” of common sense, and above it fanaticism begins), but also harmful, since At the same time, the processor time required for printing and processing printer data output at such a high resolution increases significantly. In fairly rare cases, for some projects you can use screen line values ​​above 225 lines per inch, and use a resolution of 4800 dpi for this. This resolution value will provide the required number of gradations. Do not forget also that printing with high lineatures is also fraught with big problems with copying printing forms, where a raster that is too “thin” can simply be “copied”, i.e. light areas of the form may be completely discolored; Don't forget also about dark areas that can turn into solids if the gap between the raster dots is too small. Don’t forget about dot gain, which particularly affects high-lineature works.

Type of material to be printed on Lineature Optimal resolution
lpi dpi
Low quality newsprint 80 up to 1200
Newsprint 100 1600-2400
Newsprint and offset paper 133 2200-2540
High-quality offset, coated paper 150 2540-2800
Coated paper 175 2800-3200
High quality coated papers 200 3200-3600 and more

Various color modes:

  1. RGB mode (millions of colors)
  2. CMYK mode (four-color printing colors)
  3. Indexed color mode (256 colors)
  4. Grayscale mode (256 shades of gray)
  5. Bit mode (2 colors)

A color mode, or picture mode, determines how colors are combined based on the number of channels in the color model. Different color modes provide different levels of color detail and file size. For example, use the CMYK color mode for images in a full-color printed brochure and the RGB color mode for images intended for the web or email to reduce file size while maintaining accurate colors.

RGB color mode

RGB mode in Photoshop uses the RGB model, assigning an intensity value to each pixel. In 8-bit-per-channel images, intensity values ​​range from 0 (black) to 255 (white) for each of the RGB color components (red, green, blue). For example, the color bright red has a value of R=246, G=20 and B=50. If the values ​​of all three components are the same, the result is a neutral gray shading. If the values ​​of all components are equal to 255, then the result is pure white, and if 0, then pure black.

To reproduce colors on screen, RGB images use three colors, or channel. In 8-bit-per-channel images, each pixel contains 24 bits (3 x 8-bit channels) of color information. In 24-bit images, three channels produce up to 16.7 million colors per pixel. In 48-bit (16 bits per channel) and 96-bit (32 bits per channel) images, each pixel can produce even more colors. In addition to being the default mode for new images created in Photoshop, the RGB model is also used to display colors on computer monitors. This means that when working in color modes other than RGB (such as CMYK), Photoshop converts the image to RGB for display on the screen.

Although RGB is the standard color model, the exact range of colors displayed may vary depending on the application and output device. Photoshop's RGB mode changes depending on the workspace settings set in the dialog box "Adjusting Colors".

CMYK mode

In CMYK mode, the pixel for each process ink is assigned a percentage value. The lightest colors (highlight colors) are assigned a lower value, and the darker colors (shadow colors) are assigned a higher value. For example, a bright red color might be made up of 2% cyan, 93% magenta, 90% yellow and 0% black. In CMYK images, if all four components are 0%, the color produced is pure white.

The CMYK mode is designed to prepare an image for printing using process colors. The result of converting an RGB image to CMYK is color separation. If the original image was RGB, it is best to edit it in RGB mode and only convert it to CMYK at the very end of the edit. In RGB command mode "Proof Settings" allow you to simulate the effects of CMYK conversion without changing the data itself. CMYK mode also allows you to work directly with CMYK images taken from a scanner or imported from professional systems.

Although CMYK is the standard color model, the exact range of colors reproduced may vary depending on the press and printing conditions. Photoshop's CMYK mode changes depending on the workspace settings you make in the dialog box "Adjusting Colors".

Lab color mode

The International Illuminating Commission's L*a*b* (Lab) color model is based on the perception of color by the human eye. In Lab mode, numerical values ​​describe all the colors that a person with normal vision sees. Because Lab values ​​describe what a color looks like, rather than how much of a particular ink a device (such as a monitor, desktop printer, or digital camera) requires to reproduce colors, the Lab model is considered hardware independent color model. Color management systems use Lab as a color reference to produce predictable results when converting color from one color space to another.

Lab mode has a luminance (L) component that can range from 0 to 100. In the Adobe Color Picker and Color panel, components a(green-red axis) and b(blue-yellow axis) can have values ​​ranging from +127 to –128.

Lab images can be saved in the following formats: Photoshop, Photoshop EPS, Large Document Format (PSB), Photoshop PDF, Photoshop Raw, TIFF, Photoshop DCS 1.0, and Photoshop DCS 2.0. 48-bit (16-bit per channel) Lab images can be saved in Photoshop, Large Document Format (PSB), Photoshop PDF, Photoshop Raw, and TIFF formats.

Note.

DCS 1.0 and DCS 2.0 files are converted to CMYK upon opening.

Grayscale mode

Grayscale mode uses different shades of gray in images. 8-bit images allow up to 256 shades of gray. Each pixel in a grayscale image contains a brightness value ranging from 0 (black) to 255 (white). 16- and 32-bit images have significantly more shades of gray.

Grayscale values ​​can also be expressed as a percentage of total black paint coverage (a value of 0% is equivalent to white and 100% is equivalent to black).

Grayscale mode uses the range determined by the workspace settings specified in the dialog box "Adjusting Colors".

Bit mode

Bit mode represents each pixel in an image as one of two values ​​(black or white). Images in this mode are called bitmap (1-bit) images because there is exactly one bit per pixel.

Duplex mode

Duplex mode creates monotone, duplex (two-color), triotone (three-color), and tetratone (four-color) grayscale images using one to four custom inks.

Indexed Colors Mode

Indexed Colors mode produces 8-bit images with a maximum of 256 colors. When converted to indexed color mode, Photoshop builds image color table (CLUT), which stores and indexes the colors used in the image. If the color of the source image is not in this table, the program selects the closest available color or performs dithering to simulate the missing color.

Although this mode has a limited color palette, it can reduce the file size of an image while maintaining the image quality needed for multimedia presentations, web pages, etc. Editing capabilities in this mode are limited. If you need to do a lot of editing, you should temporarily switch to RGB mode. In Indexed Color mode, files can be saved in the following formats: Photoshop, BMP, DICOM (Digital Imaging and Communications Format), GIF, Photoshop EPS, Large Document Format (PSB), PCX, Photoshop PDF, Photoshop Raw, Photoshop 2.0, PICT, PNG, Targa® and TIFF.

Multi-channel mode

Multichannel images contain 256 gray levels for each channel and can be useful for specialized printing. These images can be saved in the following formats: Photoshop, Large Document Format (PSB), Photoshop 2.0, Photoshop Raw, and Photoshop DCS 2.0.

The following information may be helpful when converting images to multichannel.

    Layers are not supported and are therefore flattened.

    The color channels of the original image become spot color channels.

    Converting a CMYK image to multichannel mode creates cyan, magenta, yellow, and black spot color channels.

    Converting an RGB image to multi-channel mode creates cyan, magenta, and yellow spot color channels.

    Removing a channel from an RGB, CMYK, or Lab image automatically converts the image to multichannel by flattening the layers.

    To export a multi-channel image, you must save it in Photoshop DCS 2.0 format.

Note.

Images with indexed and 32-bit colors cannot be converted to Multichannel mode.

Today we’ll look at setting up color display, types of raster images, and converting from one type to another. Indexed Color mode and color depth. Conversion to Duotone and spot colors.

Converting an image to CMYK will not cause any dialog boxes, but you need to remember that CMYK is one of the poorest (in terms of color gamut) models and therefore converting the image from RGB And Lab V CMYK will be accompanied by loss of color. In Photoshop, you can preview an image in some CMYK image types and channels without first converting to them. All these preview operations are available in the menu View.

In point Proof Setup easy to figure out.
Checkbox Proof Colors when turned on, it makes viewing possible, and when turned off, it returns to the original view of a given color model.
Paragraph Gamut Warning(Out of Gamut Warning) is for RGB and Lab modes. When enabled, all those colors that will be lost during conversion to CMYK will be colored gray.

Types of raster images.

Photoshop supports describing images in a variety of color models. Within Photoshop there is also the concept of image type. The following types of images exist in Photoshop:

  • Monochrome images. In such an image there are only two colors: black and white.
  • Halftone images. Consist of 256 shades of gray.
  • Full color images. These are color images using the RGB, CMYK and Lab color models. They consist of several color channels. Each channel is a halftone image containing 256 shades.
  • Indexed images. These are single-channel color images containing up to 256 precisely defined colors. They are used in Web design because in many cases the sizes of indexed images are smaller than similar full-color ones.
  • Multichannel images. This type includes images containing an arbitrary number of color channels. They are used for special purposes, very often in printing.

To control and switch image models, there are special commands that are located in the subsection Mode menu Image.

  • Bitmap- converting the image to monochrome.
  • Grayscale- converting the image to 256 shades of gray.
  • Duotone- converting the image into a palette of several colors (more details later).
  • - switching the image to indexed color mode.
  • RGB- converting the image to the RGB model.
  • CMYK- converting the image to the CMYK model.
  • Lab- converting the image into the Lab model.
  • Multichannel- conversion to multi-channel image type.

The Bitmap and Duotone types have some specific features. Only Grayscale images can be converted into them. So first we'll look at conversion to type Grayscale.


Open the image photo.jpg. Select an item Grayscale teams Mode menu Image. The dialog box shown in the figure will appear in front of you. Clicking OK, you agree to discard the color information and convert the image to grayscale. Please note that converting a grayscale image to full color (RGB, etc.) will not restore the lost color information.


After converting to Grayscale command became available Bitmap menu Image, submenu Mode. A dialog box will appear in response to your command. First you need to set the resolution of the future monochrome image. Resolution is the number of image pixels per unit length. This is a very important characteristic. Typically, the resolution of an office laser printer is 600 dpi. In order for the printed image to have good quality, this value must be set. For a monochrome image, the resolution must be equal to the resolution of the output device. This means that if you are going to print a black and white image on a printer with a resolution of 600 dpi, this is the value you need to set. Lowering the resolution when converting an image to black and white will result in smooth lines being decorated with eerie jagged edges.

  • The simplest translation method is the threshold method. In the dialog box that appears, in the field Method(Method) select option 50% Threshold(Threshold 50%). You have set the threshold. When converting an image to black and white, the program analyzes each point in the image and compares it to a threshold value. All pixels with a brightness of more than 50% will become white, and those with a lower brightness will become black.
    Click OK. The gray background color was replaced by white, and the picture became black, and there were very few black places left in the picture, since the image was quite light.
  • Method Pattern Dither(pattern smoothing) is based on turning halftones into a black and white pattern (the pattern contains both black and white parts, and these parts are designed to simulate halftone transitions.)
  • Method Diffusion Dither(Diffusion smoothing) is intended for pre-press preparation of films for the modern method of printing, which is called “frequency-molded raster”. At the moment, this set of words is absolutely not informative for you, since pre-test preparation will be discussed at the very end of our course.
  • Method Halftone Screen designed for preparing films with a raster called "linear raster". This information is also not yet incomprehensible, but it will certainly become clear a little later.

An ink drawing saved as a monochrome image at sufficient resolution will produce excellent results because the ink is a very uniform black color. If the original is a pencil drawing, as in this case, you can also achieve a good result (you just need to adjust the threshold value). However, there may be artistic losses in translation. The pencil drawing is not black at all. It is gray, and the tone of gray changes depending on the pressure. If a drawing uses halftones as an artistic device, the copy will be worse than the original. When converting or scanning tone originals - photographs and drawings - in this mode, large losses of content are possible, because the conversion does not take into account the plot and artistic value of the image details. For example, it is undesirable to apply this method to portraits. The human eye is very sensitive to facial details. Converting portraits to monochrome removes most of the details and makes the remaining ones coarser. As a result, the model's face may change beyond recognition. However, successful conversion of a halftone image to monochrome is still possible, and is often used to achieve special effects. For this purpose, special algorithms are used, some of which are made in the form of Photoshop filters.

Conversion to Duotone and spot colors.

Color printing is usually produced by sequentially applying four base inks - cyan, magenta, yellow and black. Bring an illustration to your eyes in a magazine or color newspaper, or look at it through a magnifying glass, and you will see that it consists of a whimsically intertwined pattern of dots of different colors. The human eye is “deceived”, and instead of multi-colored dots we see a realistic picture. Please note that there is no actual mixing of colors! However, there is another way of printing. You can actually prepare the paint in the color you want and then put it on the paper to match the printing plate. In this way you will get the desired color and its shades. Colors printed with pre-mixed inks are called spot colors. Sometimes they are called simple, and process colors are called composite. Spot colors were used in printing much earlier than process colors. At first glance, this method is outdated and unproductive - after all, a triad can convey any shade within CMYK, and spot paint can only convey a spot color and its shades. But this printing method has several advantages that make it widely used at the present time. If you don’t need to use a lot of colors in your illustration, the spot method is very economical. Business cards, letterheads, newspapers and even illustrated magazines can be printed in just one or two colors complementary to black.

When the same color is used in a drawing with different saturation and brightness, spot color achieves a great effect with very modest means. This way you can print tinted images.

Spot colors are very accurate. Since the spot color is selected in advance by the designer from a catalog, it is used to obtain an exact color (for example, in a company logo). When printing in spot color, even on not very good equipment, it is possible to achieve excellent quality graphics (logos, titles, underlining) and tinted photographs. Spot inks can go far beyond CMYK gamut. These are metallic paints of all types, fluorescent, very bright or, on the contrary, pastel colors. If you use an additional plate for a spot color (say, silver) in a color image, your graphic capabilities will increase (although the cost of publication will also increase). Usually, for economic reasons, one, rarely two, spot colors are used together with process colors. The introduction of each additional component greatly increases the cost of the process. In addition, the more plates, the greater the likelihood of defects, and the more advanced equipment must be used for printing.

The production of spot (and process) inks for printing is an important manufacturing sector. In order for all participants in the process of producing color printed products to agree, it is necessary not only to describe the color, but to have a sample of it. Paint companies want their colors to be the most accurate because this increases popularity and sales. Therefore, manufacturers create catalogs of their products. The most famous color catalog is Pantone Matching System. This catalog contains samples of all colors PANTONE for matte and glossy paper (colors on matte paper look less vibrant), special colors (pastel colors, metallic and fluorescent paints). Since the conversion of spot colors to process colors is a frequent case in practice, in the catalog PANTONE There are process equivalents to spot colors. All colors are applied using the exact paints supplied to the customer. Different publications are used for different purposes (fans, catalogs with tear-off samples, etc.). PANTONE- not the only paint catalogue, there are many others, for example, TOYO- catalog of flowers most common in Japan, FOCOLTONE, containing 763 process colors, and others. Colors for electronic publications are also standardized - these are, for example, palettes System for Windows and Macintosh, or palette WebSafe, used for the Internet. All of these color catalogs are included with Photoshop as standard libraries. After such an introduction, it becomes clear that it has something to do with spot colors. This is undoubtedly true. Let's try to convert the image to Duotone. Let me remind you that before this it must be translated into Grayscale.

After the conversion, the item became available Duotone, and we will use it. In the dialog box that appears, settings for the final image are available.

The drop-down menu indicates how many colors will be mixed:

  • Monotone- choose one paint color;
  • Duotone- the final color is made up of two colors;
  • Tritone- the final color consists of three colors;
  • Quadtone- the final color is made up of 4 colors.

The color itself is selected as follows: simply click on the color icon, and a dialog box that looks like this will appear:


In the drop down menu Book the catalog from which you choose the color is selected. Below is a color selection window, to the right of this window is a color selection ruler, i.e. You indicate the approximate shade of the color and shades of the selected color appear in the color selection window. Each color in the catalog has its own name, which is signed under its sample. An alternative method for selecting colors is presented in the next window.

The selection technology is simple - point your mouse in the color selection field to the color you like. However, there are a huge number of nuances. Checkbox Only Web Colors leaves the choice of only 216 colors used by default in Internet browsers. The hexadecimal color code is from the same opera. When marking web pages, color is usually indicated by a hexadecimal code and, accordingly, in this case you can select a color and see how it is indicated by the code. To the right of the color selection field there are fields showing the old color and the newly selected one (very convenient to compare when adjusting shades); To the right is a triangle with an exclamation mark inside. This icon appears when you try to select a color that is not included in the current model's color gamut. The block responsible for the color selection method is highlighted in a blue frame. If there is a black dot opposite any parameter, then color selection through the vertical selection scale will be carried out precisely according to this parameter. If the dot is opposite the letter H(Hue), then the color selection is carried out according to all tones (colors), and the range of colors will be displayed in the vertical color selection scale. If the dot is opposite the letter S(Saturation), then in the vertical scale the selection will be carried out according to the saturation of the current color, if on the contrary B(Brightness), then based on the brightness of the current color. Color selection works similarly in other color models.

It is worth noting that the color ratio in different models is expressed in different units.

  • In the model H.S.B. shade H(Hue) is measured in degrees and the maximum value is 360 degrees, saturation S(Saturation) is measured in percentage of white ink added (%), brightness B(Brightness) is measured in percentage of black ink (%).
  • Relationship between colors RGB measured in shades, which range from 0 to 255 in each channel. Equal ratios of all channels produce gray colors.
  • Colors CMYK correlate with each other in percentage terms. Each paint can be from 0 to 100%.
  • IN Lab color has a brightness gradation from 0 to 100. Color gradation in channels a And b from -128 to 127. As a building, I suggest you think - why?

Note: Please note that in general the main and background colors can be selected not only through the Color and Swatches palettes. If you click on the main color icon, a window will open that is similar and completely identical to the Picker and Custom color selection windows just discussed (according to the catalogue). The same applies to the background color, i.e. if you click on its icon, the same windows will open.

Regarding further transformation into Duotone, then after selecting the number of paints and their color, all you have to do is click on Ok and the image will be converted.

Indexed Color mode and color depth.

class=opr>Color depth is another important parameter for raster images. Let us immediately stipulate that it is closely related to the architecture of existing computers and historically established standards. Color depth is expressed in bits and indicates how many bits of memory are required to store one pixel in an image.

A computer deals with digital information in the binary number system. The binary digit can have two values: one or zero (as you know, the decimal digit can take ten values ​​from zero to nine). This smallest piece of information is called a bit. Eight binary digits, eight bits, form a byte. A byte can take 2 8 = 256 values ​​(eight decimal places can take 108 = 100,000,000 values). Why are bytes made up of eight bits? Yes, simply because the first microprocessors had eight digits. The bit capacity of modern microprocessors for compatibility with their predecessors is also a multiple of eight. For larger values, “pseudo-decimal” prefixes are used: 1024 bytes = 1 KB, 1024 KB = 1 MB.

In computer memory, information about the color of image pixels is also stored in binary representation. Therefore, to quickly process it, the pixel is encoded with one or more bytes. The only exception is monochrome images. To store information about the color of a pixel in such an image, one bit is enough, because a pixel can have only two colors. Thus, the color depth of monochrome images is 1 bit. Knowing how much memory is required to store one pixel of an image (that is, the color depth), it is easy to calculate how much memory the entire image will take up. For example, a 100 x 100 pixel image would take up 100 pixels x 100 pixels x 1 bit = 10,000 bits, approximately 1.2 KB. The amount of memory occupied by color images depends on the number of channels they contain. Each channel is grayscale, that is, encoded by one byte. If there are three channels, as in images in the RGB or LAB model, then there are 8 bits x 3 = 24 bits per pixel. In the CMYK model, there are four channels and the color depth is 8 bits x 4 = 32 bits. Thus, the memory footprint of color images is three or four times greater than that of grayscale images: 100 pixels x 100 x 24 bits = 240,000 bits approximately 29.3 KB or 100 x 100 x 32 bits = 320,000 bits = 39 ,1 KB.

When we talked about color depth for raster image types, we were talking about the most common images with eight-bit channels. Adobe Photoshop allows limited editing of 16-bit-per-channel images (Selecting Regions, Feather, Rubber Stamp, in general, very little functionality.) It is not difficult to calculate that a color image with eight-bit channels can contain a maximum of 2 24 = 16.7 million flowers. With sixteen-bit channels, the number of colors increases to 2 16x3 = 2 48 = 281 billion. This number of colors only makes sense to use if your scanner supports 48-bit color. So far, only very expensive professional scanners can do this.

To convert from 8-bit color to 16-bit color and vice versa, use the commands of the same name from the submenu Mode from submenu Image. (8 bits/channel And 16 bits/channel). Another type of images is class=opr>indexed images. This is one of the first ways to represent color bitmaps. It was widely used in those days when computers were not so powerful, and video adapters supporting more than 256 colors were a luxury. An indexed image is designed to store no more than 256 colors. The colors used in the indexed image can be arbitrary, but their total number must not exceed that specified. Which colors are used in the image is determined by its palette. An indexed image's palette is a numbered list of colors and is stored in a file along with the image. Each byte of the indexed image stores the number of the color in the palette, rather than the values ​​of the RGB components of the color. As a result, there are not 24 bits per pixel of a color indexed image, but only 8.

The palette of an indexed image can have not only 256 colors, but also a smaller number. Reducing the palette makes it possible to reduce the file size. For example, if the palette consists of 64 colors rather than 256, then encoding one pixel will require only 6 bits, not 8. As a result, the image size will be reduced by a quarter. Thus, the color depth of indexed images can take integer values ​​in the range from 1 to 8. The compactness of color representation in indexed images explains their current field of application - Web design.

Indexed images are obtained from full-color images by reducing the number of colors used. In other words, the image is reduced to a limited palette. Which of the image colors will fall into the palette is determined by special algorithms or indicated directly. The first method is used when it is necessary to achieve the best approximation of the indexed image to the colors of the original. They resort to the second if they want to achieve the same color reproduction in different programs or on different computers. To convert an image to indexed, you must select an item from the sub-item Mode menu Image. In response, you will receive the following window:

Photoshop offers the following ways to create a palette: Perceptual(Perceptual), Selective(Selective) and Adaptive(Adaptive). Algorithm Adaptive(Adaptive) places colors that are dominant in a full-color image into an indexed palette. If, for example, the palette is compiled for an image with a forest landscape, then it will contain predominantly shades of green. The palette of the seascape will consist mainly of shades of blue. Algorithm Perceptual(Perceptual) seeks to place in the palette of the indexed image those colors to which the human eye is most receptive. Algorithm Selective(Selective) is based on Adaptive, but gives particular preference to dominant colors. It is offered by Photoshop by default. All of the above algorithms create a special palette for each image. This achieves the best reproduction of the colors of the original.

To achieve the same color reproduction across different computer platforms and legacy video equipment, Photoshop has four standard palettes: two system MacOS And Windows, palette Web and a uniform palette. The first two correspond to the colors used by the operating system. If you use the colors of these palettes in your image, this will fully guarantee their correct and identical reproduction on any computer of the selected platform. The Web palette is used by browsers. Its use will ensure almost identical reproduction of the colors of the indexed image by any browser on any computer. A uniform palette consists of colors obtained by uniformly dividing the entire color range of the image by the number of colors in the indexed palette.
In field Colors(number of colors) Enter the number of colors to remain in the converted image.
Chapter Forced(Force) tells the indexing algorithm which colors should be included in the indexed palette anyway i.e. regardless of whether they are in the original image or not. The drop-down menu has the following sections:

  • Black and White- include black and white colors in the palette.
  • Primaries (basic)- basic colors of RGB and CMYK models
  • Web- Web palette colors (colors that are supported by all Internet page viewers).
  • Custom- manual selection of colors, that is, you yourself specify which colors will be forced on. As soon as you select this item, a dialog box will appear in which you will make your choice. The principle of selection is simple - click the mouse on the color that you want to change and you will see the color selection window, which was described earlier. There you select a color and click Ok. You can do this with any unwanted color. If a color is not needed at all, then it can be removed by clicking on the color while holding down the key Ctrl.

Checkbox Transparency(transparency) only makes sense if there are transparent areas in the image. File formats that deal with indexed images can store transparent areas, which is very common in Internet technologies. Therefore, it is possible to preserve these areas when converting to an indexed image.

Drop-down menu Matte(border) allows you to set a border of almost any color around the image if the image has transparent areas. We'll look at this matter in more detail later.

Fixed predefined palettes do not allow you to achieve such an exact match of colors to the original as algorithmic ones - they are intended for special purposes. How are those colors of the source image that are not in the palette transmitted during indexing? Missing colors are transmitted not by one, but by several neighboring image pixels. The shade of gray missing in the image palette is conveyed by alternating pixels of darker and lighter shades. Often such “synthesized” colors are called hybrid, and the imitation of missing colors is called class=opr>dithering (smoothing). The smoothing algorithm is set in the drop-down menu Dither. Adobe Photoshop offers several anti-aliasing algorithms. First, Pattern, works approximately as described above. The missing colors are replaced with a "pattern" of pixels present in the palette of the indexed image. This method does not always give a satisfactory result, since a clearly visible regular structure of “patterns” appears. The algorithm gives the best appearance Diffusion. Simplified, it can be described as follows. Photoshop starts antialiasing at the first, top-left pixel in the image and proceeds line by line to the last, bottom-right pixel. The color of the first pixel is replaced with the closest color from the limited palette. The color of the second pixel is chosen so that, together with the first, they produce a color that is closest to the color of the second pixel of the original. This algorithm allows you to “dissipate” the error in color selection throughout the image without the appearance of regular patterns. The third algorithm Noise, is an improved version of the Diffusion algorithm, creating even less regular smoothing. In field Amount the degree of smoothing is introduced. The stronger the antialiasing, the greater the range of colors the indexed image can convey.

Checkbox Preserve Exact Colors(Keep True Colors) causes the anti-aliasing algorithm to preserve pixels of those colors that are in the palette without including them in error diffusion (pixels participating in diffusion anti-aliasing) or patterns (Patern). These transformations seem so difficult. In fact, the main thing is to initially figure out where and what to configure, and then this will happen automatically, setting settings that you won’t even think about.

Share with friends or save for yourself:

Loading...