Bitmape
Bitmape
CHAPTER 2 Bitmaps
The computer can only work with digital data. In order to process an image with a
computer, it must be digitally expressed. There are two main ways to digitally represent
images: raster and vector. This chapter will be devoted entirely to the first of them. It is for
working with raster graphics that Photoshop is intended. Despite its strict specialization,
Photoshop has some "vector" tools, and their set is expanding from version to
version. Nevertheless, vector tools in Photoshop perform auxiliary functions and are used
as an additional tool in solving the main task: correction and editing of raster images.
This chapter is considered by the authors to be very important, despite the fact that there is
almost no exercise in it. If a beginner does not quite understand how the image that he is
editing is arranged, and what actually happens to the document, then a positive result will
be perceived as a miracle, and the process of working with the program will resemble a
magic ritual. On the contrary, a professional clearly understands the whole process of
image processing, understands how the tools work and knows what characteristics the
image should have for different purposes (viewing on a screen, printing on various devices,
paper, etc.). If you want to get good and stable results, we advise you to understand the
concepts that you will come across in this chapter.
Bitmap structure
Raster images are very similar to a mosaic, in which the pattern is formed from small
monochrome elements, glasses. If you move away from the mosaic panel far enough, the
individual glasses become indistinguishable small, and the image seems to be
homogeneous (continuoustone). According to this principle, a bitmap image is encoded in
computer graphics. All of it is divided into small cells, each of which receives a color
averaged over the occupied area. For simplicity and speed of processing, the breakdown is
performed as in a table: by horizontal lines and vertical columns (this is why bitmaps are
always rectangular). When working with an image, the computer "remembers" this entire
table and the color of each of its cells. Thus, there are no objects as such in bitmaps.
This simple coding method also makes it easy to automate with scanners. The main unit of
a flatbed scanner is a line of light-sensitive elements. It is placed on the original (drawing,
photograph, slide, etc.), and the color measured by each of its elements is entered in the
corresponding column of the table. When you move the ruler along the image, color
measurements are taken at equal distances and recorded in the rows of the table. As a
result, the table is an exact snapshot of the original in digital form. Each cell in the table is
called a point, and the entire table is called a bitmap.
The monitor is also a bitmap device. Its screen is covered with a rectangular grid of
phosphor dots. When displaying an image, the encoded information is visualized using an
inverse scan operation. Each point of the image is associated with a point of the phosphor,
called a pixel. Therefore, a point in a digital image is often identified with a pixel and it is
said that a raster image consists of pixels, although this is not entirely true. The monitor is
not the only output device. The image can be printed on a printer, typographic machine,
output to film or photo paper. Most output devices, like monitors, are also raster devices,
and the points of the image are mapped to the points of these devices.
Let us emphasize that the digital image in the computer memory does not have its physical
embodiment, it is just a set of numbers. It can only be seen through some kind of output
device. For this reason, the appearance of the image (size, quality, color reproduction, etc.)
is highly dependent on the characteristics of the monitor or printer.
Resolutions and sizes
The more glasses make up the mosaic, the more details the artist can convey. Bitmaps are
also characterized by the number of pixels they make up.
Due to the frequent identification of points and pixels, the dimensions of the images are
measured in pixels. This is convenient if the image is intended only for display on a monitor
(Web pages and other documents for electronic distribution). The convenience comes from
the standardized number of pixels that monitors can display. For most monitors of IBM-
compatible computers, this value is 640x480, 800x600 and 1024x768 horizontal and
vertical pixels, respectively. Professional monitors are capable of displaying more pixels.
To imagine how much space on a monitor screen will take an image of a known size, you
need to know how many monitor pixels are per unit length. This value has its own name,
resolution, and is measured in pixels per inch (pixelperinch, ppi). In each specific case, it
depends on the physical size of the screen and the set size of the raster grid, that is, the
number of pixels vertically and horizontally. The number of possible combinations of these
parameters is very large, but most often the resolution of monitors is set in the range from
72 ppi to 96 ppi. At higher resolutions, program interface elements (text in menus and
dialog boxes, toolbars, etc.) become too small, and the eyes quickly get tired. Low
resolution, on the contrary,
Note
It happens that "monitor resolution" is mistakenly called the number of pixels that it displays
vertically and horizontally. For example: "The maximum resolution of this monitor is
1024x768 pixels."
Image Resolution
As mentioned, expressing image size in pixels is useful when preparing graphics for
electronic distribution. If the goal is to obtain a printed copy, then it is better to operate
with metric units.
Knowing the resolution of the monitor, it is easy to calculate the size of the image on the
screen. For example, an image of 100x50 pixels will occupy about 1x0.5 inches == 25x13
mm on the screen (100 pix / 96 ppi = 1.04 inch; 50 pix / 96 ppi = = 0.52 inch; 1 inch = 25.4
mm) ...
The above calculation was performed based on a monitor resolution of 96 ppi. For a
resolution of 72 ppi, the size of the same image will be different: 1.4x0.7 inches = 35x18
mm (100 pix / 72 ppi = 1.39 inch; 50 pix / 72 ppi = 0.69 inch).
It is not very convenient to perform such calculations every time you need to estimate the
size of an image on a specific output device. Therefore, the size of raster images is most
often characterized in the same way as raster devices: resolution. Instead of the size in
pixels, when creating or scanning an image, the resolution and geometric size in
centimeters or inches are indicated. The digital image does not acquire physical
dimensions from this. This method is equivalent to the assumption: "if the image was
displayed on a device with a given resolution, then it would have a given size."
Of course, the same image (with the same number of pixels) can be represented in an
infinite number of size / resolution ratios. An example of this was given above: a 100x50
pixel image is characterized as "25x13 cm, 96 dpi" or "35x18 cm, 72 dpi". You can think of
any number of such size / resolution pairs. The more you set the resolution of the image,
the smaller its size will be. This conclusion is obvious enough. After all, the higher the
resolution of the intended output device, the smaller its raster points and the smaller the
geometric size of the image.
When creating or scanning images, you will always know (at least approximately) the
required geometric size of the image and its resolution. Geometric size is determined by
the design of a "paper" publication or Web page. The resolution is determined by the
intended output device. By setting these parameters while creating or scanning images, you
not only save yourself from calculations. Data on geometric dimensions of images is used
when printing from Photoshop and when placing images in publishing systems and
illustration programs. Compliance with the resolution of the images to the resolution of the
output device will be on your conscience.
Image files store information about the geometric size and resolution of images. These
values are used when placing an image in a layout program or preparing illustrations.
Print resolution
Most printing devices, from printers to printing machines, are raster. However, the
screening technologies they use can differ quite significantly. We'll discuss the rasterization
mechanisms in various output devices in more detail in Chapter 10. Print device resolution
also plays a key role in this. For now, just note that for printing on a printer, the image
resolution should, as a rule, be in the range from 120 to 150 ppi, and for high-quality
typographic printing - 250-300 ppi.
The view scale does not affect the image size in any way. If you need to change them, you
need to refer to the special command Image Size , located in the Image menu .
3. In the Image Size dialog box that appears (Fig. 2.1) in the Pixel Dimensions field,
the image dimensions in pixels are displayed by default. In our case, it will be 425x285
pixels. Next to the heading of the Pixel Dimensions area , the amount of disk and RAM
occupied by the image is indicated - 10KB.
4. In the Document Size group of parameters, you can see the geometric dimensions of the
image that it will have when printed on the printer. Below, in the Resolution field , the
resolution is in pixels per inch.
5. Without touching the field values for now, close the window by clicking
the Cancel button .
The Image Size dialog box allows you not only to recognize, but also to change the
parameters of the document. There are two possible options to define the state of the
flag Resample Image (Zoom image)
If checked, the image size and resolution are varied independently. If you prefer, you
can adjust the "absolute" size of the image in pixels. This forces Photoshop to
remove pixels from the image or add new ones to it. The colors of the added pixels
are calculated using interpolation.
If unchecked, the "absolute" size of the image in pixels is fixed. Resizing changes the
resolution and vice versa. In essence, no action is performed with the image, but
only the new values of dimensions and resolution are stored.
Figure: 2.1. Image Size Dialog Box
The list to the right of the Resample Image checkbox contains a list of available
interpolation algorithms. The slowest and most accurate algorithm is Bicubic. We
recommend that you always use this method. The extra fractions of a second of waiting are
fully justified by the high quality of the scaled image.
The Constrain Proportion checkbox fixes the aspect ratio of the image. When it is
installed, it is enough to enter the length of only one side of the image, and the second will
be calculated automatically
Scaling changes the amount of graphic information that the image contains. For the
experiment, we will not use the Pyramid.jpg document itself, but a copy of it.
2. Open the Image Size dialog box . In the Resolution field, enter 96. Note that the
resolution field and the pixel dimensions field are related. As the resolution decreased, the
values in the Width and Height fields (136x91) and the size of the document file
decreased. Please note that the geometric dimensions of the image do not change. Click
OK. You have received a reduced resolution copy of your document.
3. 3. Reducing the resolution reduced the number of pixels in the image, and, accordingly,
the amount of graphic information contained in it. These pixels are lost forever, they can no
longer be returned by raising the resolution. Reopen the Image Size dialog box , increase
the resolution to the original resolution and close the window with OK.
4. Compare the original and the copy of the image (Fig. 2.2). The scaled image looks out of
focus and lacks detail. Pixels introduced into the image by interpolation do not improve its
quality. For this reason, the cases when you really need to increase the resolution or
increase the size of images can be counted on one hand.
Figure: 2.2. Original (a) and interpolated (b) image When obtaining and processing
images, it is important that its size in pixels is optimal. That is, for a given geometric size,
the image resolution must correspond to the resolution of the output device. If it is a
monitor, then 96 ppi is the best resolution.
Colors and shades
Color imaging technologies have entered everyday life relatively recently. There are still
black-and-white photographs in family albums, and black-and-white televisions are living
out their long centuries in the dachas.
However, even now black and white images are widely used where color is not required, or
as an artistic effect.
Obviously, shades of one color are often sufficient to convey an image. When it comes to
emitted colors, then a color shade means the same color, but different in brightness. In a
black-and-white TV, the image is formed by phosphor dots, which can glow with different
brightness. In other words, the image is built from shades of gray from black (minimum
brightness) to white (maximum brightness). If the phosphor shone, for example, in brown,
then the image would be built from shades of brown.
Colors on a print do not emit light, so their shades differ in optical density. Optical density
is a measure of light absorption. The higher the optical density, the darker the shade. If the
image is not printed in shades of gray, but in some other color, it is said to be tinted. Think
of old sepia-toned photographs, for example.
In computer graphics, such images are called grayscale, because they consist of shades of
one color tone. In graphics programs, including Photoshop, each color can have 256 shades:
from black (zero brightness) to white (brightness equal to 255). Information about the
brightness of image pixels is stored in the channel. Thus, one channel is sufficient for a
grayscale image.
2. Open the channels palette (Fig. 2.3) using the Show Channels command of
the Window menu .
Figure: 2.3. The Channels palette for a halftone image
Here is a palette that lists all the channels of the current image. As you can see, the Girl.jpg
image has a single Gray channel, where the pixel brightness is stored. Since grayscale
images use a single color, one cannot speak of a “grayscale” color model.
Color mode
Color models
Colors are formed in nature in different ways. On the one hand, light sources (the sun, light
bulbs, computer and television screens) emit light of various wavelengths, which the eye
perceives as colored light. Falling on the surface of non-luminous objects, light is partially
absorbed and partially reflected. The reflected radiation is perceived by the eye as the color
of objects. Thus, the color of an object arises from radiation or reflection. The description of
the color of an object in the first case differs from the second, that is, different color models
are used.
RGB model
The RGB model describes the emitted colors and is based on three base colors - Red, Green,
Blue. The rest of the colors are formed by mixing these three basic ones. When two rays of
primary colors are added (mixed), the result is lighter than the components. Colors of this
type are called additive (Figure 2.4).
Mixing red and green makes yellow, green and blue - cyan, blue and red make magenta. If
all three colors are mixed, the result is white. By mixing the three basic colors in different
proportions (with different brightness), you can get all the variety of shades. If we talk
about a raster image in the RGB model, then each of its pixels is represented by the
brightness of the three basic colors: red, green and blue.
As discussed above, pixel brightness is stored in channels. Thus, an RGB image requires
three channels (Figure 2.5).
A color channel is a grayscale image that reflects the brightness distribution of the
corresponding base color. If the document has a Grayscale model , then the content of the
only channel forms the image. Channel editing and image editing are the same in these
cases.
If the document model is RGB, then the images in the red, green and blue channel,
superimposed on each other, form a color image. At the same time, notice that the colors
are mixed additively, like rays of light. This means that when overlaid, the result is
lightened. The lighter the channel, the more base color the image contains. Let's check this
vague statement in practice. To study channel interactions, it is convenient to display them
in color. All operations with channels are carried out in the Channels palette .
Figure: 2.5. RGB image channels
1. Open the Pyramid.jpg document located on the diskette. Pay attention to the title of the
window. For full color images, it indicates the color model.
2. Select the Color Channels in Color check box in the Display & Cursors group of
the Preferences window . If this checkbox is checked, the channels are shown in the
corresponding color. When unchecked, channel content is displayed in grayscale.
3. Open the Channels palette . To do this, use the Show Channels command of
the Window menu . Here are the color channels of the image, each with its own color (Fig.
2.6). Contrary to expectations, the palette shows four channels, since images in RGB, CMYK,
or Lab color models have an additional aligned channel on the channel palette, which
occupies the top row of the palette. It shows the resulting image. The co-channel line allows
you to switch from viewing individual channels to viewing a summary image.
Figure: 2.6. RGB channels in the Channels palette
Channels selected for viewing or editing are called active, and all actions performed in the
document window apply only to them. In palette Channels (Channels) they are
highlighted. By default, the co-channel is active.
1. Click on the name of the Red channel. Its line will be highlighted in blue, and the lines of
all other channels will be white. The image in the document window will turn out to be
black and red, since the red channel is selected as the active one.
2. Now select the co-channel line. The image has returned to its normal color.
3. You can display any two channels at the same time. Click on the "Eye" icon next to the
Green channel. Now two other channels are visible - Red and Blue. The "Eye" icon defines
the channel display mode by the "visible / invisible" attribute. For a co-channel, this icon is
enabled only when all color channels are visible. One channel, or any pair of RGB channels,
is always darker than the result of combining all three. This is not surprising if you
remember that the colors in this model are mixed additively.
4. Note the keyboard equivalents listed on the line for each channel. They allow you to
quickly select the active channel. Check out these key combinations in action.
5. In order to make several channels active, hold down the Shift key while selecting
subsequent channels with the mouse. Try to activate any two channels at the same
time. Unfortunately, the Shift key has no effect when using the keyboard to select channels.
The content of the channel is judged by the reduced figure, the thumbnail, located on the
channel line. The thumbnail is constantly updated as you edit the layer. If you find the
thumbnails in the Channel Panel too small, you can enlarge them.
1. Click in the Channels palette on the triangular arrow to the right of the tabs. In the list of
commands that opens, select Palette Options .
2. The Channels Palette Options dialog box (Fig. 2.7) will appear on the screen , in which
there is only one field that determines the size of the thumbnails. Choose the switch you
want.
Tip
Larger thumbnails will require slightly more screen space and display time. If you have a slow
computer, then it makes sense to completely disable their output in the palette: to do this,
select the None option.
3. Click OK.
At the bottom of the palette (from left to right) there are three icons that are used to save
the selected area in a new channel, to create a new channel and to delete a channel. These
operations only apply to additional alpha channels, which are discussed in the next chapter.
If you represent the RGB model in graphical form, you get a three-dimensional coordinate
system. Any coordinate reflects the contribution of each component to the resulting color
in the range from zero to the maximum value. All colors "are" inside the resulting cube,
forming a color space.
The origin where all components are zero. No radiation (black). The point closest to the
viewer where all components have maximum value (white). The line connecting the first
two points (diagonally) where the gray shades are located: from black to white (gray scale,
usually 256 gradations). Here, all three components are the same and range from zero to
maximum value. Three vertices of the cube give pure original colors, the other three reflect
double blends of the original colors.
HSB model
HSB is a very easy-to-understand model that computer artists often use. It is based on RGB
colors, but has a different coordinate system. Any color in the HSB model is determined by
its hue (color itself), saturation (that is, the percentage of white ink added to the color) and
brightness (the percentage of black ink added). This model was named after the first letters
of the English words Hue, Saturation, Brightness, - HSB. Thus, the model has three color
channels.
Spectral colors (pure colors of the solar spectrum) or color tones (hue) are located at the
edge of the color wheel and are characterized by a position on it, which is determined by an
angle in the range from 0 to 360 degrees. These colors have maximum saturation and
brightness (100%). Saturation changes along the radius of the circle from 0 (in the center)
to 100% (at the edges). At 0% saturation, any color becomes white.
Brightness - a parameter that determines the lightness or darkness. All colors in the color
wheel are at their maximum brightness (100%) regardless of hue. Decreasing the
brightness of a color means it darkens. To display this on the model, you need a new
coordinate. Direct it, for example, downwards, on it you will plot the brightness values from
100% to 0%. The result is a cylinder (or cone, if you cut off the black), which is formed
from a series of circles with decreasing brightness, the bottom layer is black.
In the HSB model, any color is obtained from the spectral color by adding a certain
percentage of white and black paints, that is, in fact, gray paint.
The HSB model is not rigorous in terms of human perception. The description of brightness
in it does not correspond to the perception of the human eye. The point is that the eye sees
spectral colors as having different brightness. Thus, spectral green appears to be the
brightest, red is less bright, and blue is the darkest. In the HSB model, all spectral colors are
considered to have 100% brightness, which is not true. Let's add that it is device-
dependent, since in fact it is based on the RGB model. Therefore, if you are going to work
with accurate color values, this color model should be avoided. Photoshop cannot work
directly with images in this model. At the same time, it is convenient to visually select
colors with its help, and Photoshop provides this opportunity.
Note
Each point of an RGB image is perceived by the eye as emitting more or less light, that is, more
or less bright. All three color channels of the image take part in the formation of this point. If
all three colors were perceived as equally bright, then each would add a third part to the total
brightness: Y = R / 3 + G / 3 + B / 3
This is how brightness is calculated in the HSB color model. Since, as we have already found
out, different base colors have different perceived brightness, this calculation does not
reflect the real state of affairs, therefore, in particular, the HSB model cannot be considered
correct. To calculate the brightness of RGB channels in Photoshop, the following empirical
formula is used, taking into account the contribution of each color channel:
The color wheel can be helpful in choosing the right color scheme, if you take into account a
few notes on the arrangement of colors on this wheel and their mutual combination.
Complementary colors.
They are located opposite each other. When they are mixed, black (if it is paints) or
white (if it is light rays) color is formed. These are the most contrasting colors, and
together they irritate the eye (red and green, yellow and purple, blue and
orange). Used to create strong color contrast.
One color is combined with two others that are adjacent to its complementary color
(green, dark orange, burgundy). This combination is softer, but quite contrasting.
Triads.
Colors equidistant from each other on the color wheel. They form harmonious
combinations (yellow, purple, blue or orange, emerald, burgundy), which creates a
palette of saturated colors and shades.
Adjacent colors.
They form a low-contrast combination that gives the picture a strict look, for
example, in diagrams or letterheads of a reputable company.
In addition to color tone, the perception of illustration objects is always influenced by color
saturation and brightness. In general, the clearer the tone, that is, the greater both of these
characteristics, the more the object will attract attention. If your drawing has a particularly
important detail, and the rest of the shapes are just a background for it, then it is wise to
lower their brightness or saturation. Decreasing saturation will lighten the picture, it will
acquire a pastel palette. Decreasing the color brightness, on the other hand, will darken the
illustration. An extreme case of a color accent due to the difference in brightness and
saturation is the combination of black or white with spectral colors, which produces a
strong effect
CMYK Model
Colored non-luminous objects absorb some of the white light incident on them and reflect
the remaining radiation. Depending on where the absorption occurs, objects reflect
different colors, which determine the color of these objects. Colors that use white light by
subtracting certain parts of the spectrum from it are called subtractive ("subtractive")
colors.
To describe them, the CMY model (Cyan, Magenta, Yellow) is used. In this model, the
primary colors are formed by subtracting the primary additive colors of the RGB model
from white. It is clear that in this case there will also be three main subtractive colors,
especially since they have already been mentioned: cyan (white minus red), magenta
(white minus green), yellow (white minus blue).
When two subtractive components are mixed, the resulting color is darkened (more light is
absorbed, more paint is put in).
Thus, mixing the maximum values of all three components should result in black. In the
complete absence of ink (zero values of the components), a white color is formed (white
paper). Mixing equal values of the three components will give shades of gray. The CMY
model (Figure 2.8) is similar to the RGB model, in which the origin has been moved.
This model is the basic model for the printing industry. Magenta, cyan, yellow colors make
up the so-called printing triad, and when printed with these inks, most of the visible color
spectrum can be reproduced on paper.
However, real paints have impurities, their color does not correspond exactly to the
theoretically calculated cyan, magenta and yellow. The blue ink pigment is especially "bad",
and the mixing of the three base inks, which should produce black, results in a vague mud
brown instead. In addition, to obtain an intense black, you need to put a large amount of ink
of each color on the paper. This will lead to waterlogging of the paper, and it is
uneconomical.
For the reasons mentioned above, black is included in the number of basic printing inks
(and in the model). It was she who added the last letter to the name of the CMYK model,
although not quite usual: C is Cyan (Cyan), M is Magenta (Magenta), Y is Yellow
(Yellow). The black component is reduced to the letter K, since this ink is the main, key
(Key) in the color printing process. The number of components (channels) has increased to
four. That is, CMYK is a four-channel color model. As for the RGB model, the amount of each
component can be expressed as a percentage or gradation from 0 to 255. In fig. 2.9 shows
the Channels palette for the image in the CMYK color model. As you can see, the number of
color channels is indeed four.
Note The
popular belief that CMYK has more colors because there are more channels is
erroneous. Black is redundant for describing colors; therefore, the model contains the same
colors, described by different combinations of basic components. For example, the colors
C0M10Y10K0 and C12M18Y17K10 are the same. "Out-of-round" density values in the second
color are due to the fact that the pigments of the paints are not ideal.
View the contents of each image channel in CMYK (individually and with different
pairs). The more channels you make visible at the same time, the darker the result will
be. As you remember, in this model, unlike RGB, colors are blended subtractively.
Thus, the CMYK model, in contrast to the CMY, can be called an "empirical" model. It
describes real paint colors, not theoretical ones.
Lab model
RGB and CMYK models are device dependent. When it comes to RGB, the base color values
(as well as the white point) are determined by the quality of the phosphor used in your
monitor. As a result, the same image looks different on different monitors. If we turn to
CMYK, then the difference is even more obvious, since we are talking about real colors, the
peculiarities of the printing process and the media.
Therefore, it is not surprising that in the end the task arose of describing colors,
independent of the equipment on which they are used. colors are received. Unfortunately, it
is not possible to give a completely objective definition of color. Color is a perceived
characteristic that depends on the observer and the environment. Different people see
colors differently (for example, an artist - differently than a layman. Even in one person, the
visual response to color changes with age.
If the perception of color depends on the observer and the conditions of observation, then
at least these conditions can be standardized. This is the path taken by scientists from the
International Commission on Lighting (CIE). In 1931, they standardized the conditions for
observing colors and studied the perception of color in a large group of people. As a result,
the basic components of the new XYZ color model were experimentally determined. This
model is hardware independent, as it describes colors as they are perceived by a person,
more precisely a "standard CIE observer".
The Lab color model used in computer graphics is derived from the XYZ color model. It got
its name from its basic components L, a and b. Component L carries information about the
brightness of the image, and components a and b - about its colors (i.e., a and b are
chromatic components). Component a changes from green to red, and b - from blue to
yellow (Figure 2.10). As you can see, in the given example, the chromatic channel b (Fig.
2.10, c) has a rather high contrast because the pyramid is yellow and the sky is blue. In
channel a (Fig. 2.10, b), the contrast, on the contrary, is very low because there is neither
green nor red in the image.
a b
at
Figure: 2.10. Image (a) and its channels (b-c) in the Lab color model
Note
Many years after the development of the Lab model, it turned out to be surprisingly consistent
with the biological mechanism of human color perception. For this discovery, the Americans
David Hubble and Thorsten Weisel received the 1981 Nobel Prize.
Brightness in the Lab model is completely separate from color. This makes the model useful
for adjusting contrast, sharpness and other tonal characteristics of the image. Obviously,
the Lab model is three-channel (Figure 2.11).
Figure: 2.11. The Channels palette for the image in the Lab model
The Lab model is quite difficult to learn in practice. It's hard for us to think about color in
her categories: "Is this color more yellow or blue?" Therefore, color correction in Lab is not
widespread enough. But the value of Lab as a device-independent model has its practical
application in Photoshop as well. It serves as the core of color management systems and is
applied (hidden from the user) at every color model conversion as an intermediate.
Spot colors
Multi-color illustrations are printed in a typography with a small number of colors. The
number of paints is determined by artistic, technological and economic considerations. As a
rule, if no more than four separate colors are used in an illustration, then their colors are
used for printing. Colors printed with your own inks are called spot colors. Colors for
multicolor illustrations produced by overprinting CMYK base colors are called process
colors.
From a printer's point of view, the distinction between spot and process colors is
significant. Spot color inks are supplied pre-mixed (in separate cans), and process colors
are produced by overlaying inks on the print sheet. Accordingly, in computer publishing
programs, spot colors are selected from a catalog, and process colors are set by the
proportion of base components. With process inks, you can reproduce any color, and with
spot inks, only shades of their own color. On the other hand, spot colors provide high
fidelity, so they are also used when very accurate color is needed (for example, in a
company logo). Spot colors are also called blended colors because the inks for these colors
are mixed before they enter the press.
In some cases, spot and process colors are used together, most often when printing with
special (metallized, fluorescent, etc.) inks.
Photoshop has special support for spot colors. Thanks to it, you can evaluate the
appearance of the image intended for printing with these colors on your computer
monitor. Each spot color in the image is assigned a separate color channel. Information
about the channel color is saved in a file along with the image itself and can be used later by
a publishing system or an illustration program for color separation.
Color gamut
The range of colors that can be reproduced, fixed, or described in some way is called
gamut. Monitors' cathode ray tubes and printing inks (the range of colors they can
reproduce), color models (the range of colors they can describe) and, of course, the human
eye (the range of colors it perceives, or locus) have a certain color gamut. The monitor can
transmit only a part of what the eye perceives (it is impossible to accurately convey on the
screen, for example, pure blue or yellow). Some of what the monitor transmits can be
printed (for example, when printing, colors are not transmitted at all, the components of
which have a very low density). The difference in color gamuts is shown in the diagram
(Fig. 2.12).
From this one can draw a disappointing conclusion: the original, the scanned image and the
print can be very different from each other. Moreover, there is a possibility that two prints
of the same image made on different printers will turn out to be unequal in color.
The discrepancy between the color gamuts of different color models (and, accordingly, the
devices they describe) leads to the fact that the colors that exist in one model are absent in
the other. When converting image colors from a model to a model, Photoshop uses special
conversion algorithms. Of course, it cannot preserve the original colors that are not in the
target color model, but it tries to preserve their ratio. Thanks to this, after conversion, the
image will be perceived as similar to the original. Strictly speaking, the color gamut
conversion is performed not by Photoshop, but by the color management system. This is its
main function - to monitor the best color rendering of all devices involved in the
technological chain. Read about color management later in this chapter.
If you are preparing images for printing, you just need to control the correspondence of the
colors in the image to the gamut of the CMYK model. However, converting an image to
CMYK every time just to check the color accuracy is a sure way to degrade its quality. (For
example, when converting from RGB to CMYK, midtones in blue and green, and orange and
cyan are particularly noticeable.) To work around this issue, Photoshop lets you see how
the image will look in CMYK without performing any conversion. For this, the software
color proofing mode is used. How it works is explained below in the Software Proofing
section.
3. Notice the changed color of the sky. A large area of its plots turned out to be filled with a
conditional gray color (Fig. 2.13 b). This means that these areas will look completely
different when printed. The only consolation is the fact that you found out about it now,
and not after you received a print (or even a print run!) From the printing house.
a b
Fig. 2.13. Image before (a) and after (b) turning on the Gamut mode
Many users who prepare files for printing prefer to carry out the entire process of
processing (from scanning to output) in the CMYK model, since this is a natural model of
the printing process. The presence of a larger number of color channels in comparison with
RGB, and their lower brightness allows you to enhance the contrast, to carry out tint and
color correction of images intended for printing, more subtly.
Converting color models
Converting an image from one color model to another in the Photo-shop is extremely
easy. To do this, use the commands in the Mode list of the Image menu . There you will
find RGB Color , CMYK Color, and Lab Color commands . The color model in which the
image is currently located is marked with a check mark. To transfer an image to another
model, just select its command from the menu.
As we noted above, the simplicity of color model conversion is deceiving and should not be
used unless absolutely necessary. Any conversion from RGB to CMYK or vice versa is
associated with a change in gamut, which, each time, degrades the image quality. Get used
to the idea that the transition between color models is permissible only once. If, for
example, you are preparing an image for printing, then it may require conversion to
CMYK. Perform it when you know exactly all the printing conditions.
The Lab model has such a wide gamut that it fully accommodates both the CMYK and RGB
color spaces. Therefore, converting to Lab and vice versa does not change the image quality
and is completely safe. For the conversion between Lab and CMYK, let's make a reservation
that this is true only with constant CMYK settings. Read about what these parameters are in
Chapter 10.
Black and white line art
The simplest case is a monochrome or black and white image (bitmap). This most
economical type of image is great for line art, line art, prints, simple logos, etc. You can get
these images directly by scanning them in Black and White or Line Art modes (different
scanners call this mode differently in software) ).
How can a monochrome image be encoded? The smallest unit of information is a bit. It can
take only 2 '= 2 values (yes / no, 1/0, black / white, etc.). Each point in an image has only
one of two colors (say black or white). One bit is enough to encode the color information
for each dot.
Note
Eight bits make up a byte. A byte can encode 28 = 256 states. The decimal prefixes used for
these units are somewhat different from the traditional ones. The kilobyte (KB) is 1024 bytes,
and the megabyte (MB) is 1024 KB, or 1,048,576 bytes.
The black and white type of image is called Bitmap . The color depth of such an image is
one bit. Knowing this, it is not difficult to calculate how much memory is required to store
any such image. For example, if the image size is 800x600 pixels, then it will occupy 800
pixels x 600 pixels x 1 bit = 480,000 bits = 58.6 KB in memory.
3. Open the Mode list again and execute the Bitmap command .
4. In the Bitmap dialog box that appears, in the Method field, set the
50% Threshold option . Then all pixels with a brightness of more than 50% will become
white, with a lower brightness - black.
5. Click the OK button. The gray background color was changed to white, and the black
color of the picture remained unchanged.
6. Black and white image is single channel. Make sure of this by opening
the Channels palette (Fig. 2.14).
a b
Fig. 2.14. Black and white document (a) and view of its palette Channels (b)
Besides converting to black and white, any image can also be directly scanned in black and
white. By converting the image to black and white, the program analyzes each point in the
image and compares it to a threshold value. For example, when the threshold is 50%. If a
given point is darker than 50% gray, it turns black.
Halftone
Grayscale images are widely used for storing black and white (in the traditional,
photographic sense) photographs and in cases where color can be dispensed with. Each
point of such an image can have one of 256 shades (gradations) of gray with brightness
from black (0) to white (255). This range of values is referred to as the grayscale. It takes 8
bits to encode one pixel in gray scale (8 bits == I byte). Thus, the color depth of a grayscale
image is 8 bits, which means 256 (28) possible values for each of its pixels. This is enough
to correctly display a grayscale image, such as a black and white photograph.
As you can see, the image will take up eight times more memory space than
monochrome. If we again turn to our example with an image of 800x600 pixels, then for a
grayscale image we need 468.4 KB. Using a halftone type for storing line art will not
improve its quality, but will only waste time and computer memory.
Back in Photoshop 4.0, support for images with 16-bit channels appeared, allowing you to
increase the number of transmitted colors or shades of gray. That is, in the mode with 16-
bit channels, a grayscale image can no longer contain 256, but 65,536 shades of
gray. However, the file size with 16-bit channels is twice that of 8-bit channels. Moreover,
very few have the hardware at their disposal to take advantage of this
advantage. Therefore, in what follows, speaking about color channels and color depth, we
will mean only 8-bit channels.
Almost any scanner has a special mode for inputting black and white grayscale images
- Grayscale or Black and White Photo (the name may differ in programs of different
scanners).
Any image can be converted to grayscale. If the source material is a color photo, then it will
become black and white. The half-moon image contains only one channel (Fig. 2.15).
Tip You
can undo the transformation of an image from one type to another, just like any other
program action. To do this, use the History palette (Protocol) or press the keyboard shortcut
Ctrl + Z.
Indexed color
Monochrome, grayscale and full-color images are widely used in the manufacture of
original layouts intended for replication by any means. In addition to the above, there is
another type of color images, which until recently had a purely historical
significance. Before the widespread adoption of high-memory video adapters and SVGA
monitors, most computers were capable of displaying no more than 256 colors at a
time. Older monitors limited this number to 64 or 16. The most rational way of coding in
such conditions was their indexing. When indexing, each of the colors in the image was
assigned a sequential number, which was used to describe all pixels with this color. Since
the color set was different for different images, it was stored in the computer memory
along with the image. The set of colors used in the image is called the palette (color table),
and the color coding method is the indexed color (indexedcolor ). With the development
of computer video systems, indexed colors have ceased to be used so widely. Even modern
office computers can display 65,536 ( High Color ) or 16.8M colors ( TrueColor ) on the
screen .
The color depth of indexed images depends on the number of elements in its color table
and can range from 2 to 8 bits. To describe 64 colors, 6 bits are needed, for 16 colors - 4
bits. An image with 256 colors requires 1 byte (eight bits). The amount of memory
occupied by the indexed image changes accordingly. A 256-color image requires the same
amount of memory as a grayscale image. With a smaller color table, the memory footprint
will be even lower. Note that the image is in color at very small file sizes. It is this
circumstance that gave a second life to indexed images with the development of Web
design, since file sizes are critical for transmission over the network.
First of all, this is the palette (color table), the number of colors, complementary colors and
transparency. Below, in the group Options (Parameters), sets the way to handle
semitransparent areas and anti-aliasing parameters.
The Palette list offers several options to choose from. They can be divided into fixed and
algorithmic. The first are a strictly defined set of colors. Typically, these are the colors used
by any viewer or device (for example, the Web palette is standard for browsers, the
Uniform palette is for VGA monitors, Windows is the Windows system palette.
Photoshop generates algorithmic palettes individually for each image. These palettes
provide the most adequate rendering. Several alternative color reduction algorithms are
proposed. These include the Selective , Adaptive , and Perceptual palettes . In all cases,
Photoshop automatically selects the maximum image colors in the table, but does so using
different algorithms. The Adaptive palette is simply a selection of the most common
colors. Selective gives preference to the colors that fill the largest areas of the image plus
colors from the Web palette, a Perceptual(Perceptual) focuses on the characteristics of
perception, preserving the colors of that part of the spectrum where the eye is most
sensitive to detail.
Finally, Previous means that the program is using the table defined for the file previously
indexed in this session.
The Colors list sets the number of colors in the indexed image, in other words, the size of
the palette. This parameter is meaningful only for algorithmic palettes, since it is
hardcoded in fixed palettes. The fewer colors used in the image, the smaller its size, but the
worse the color rendering.
The Forced field specifies the color sets that are "forced" into the table. It can be black and
white, Primaries (blue, red, green, magenta, yellow, cyan, black and white) or
others. Select the Primaries option and watch the image change.
Note
Images in indexed format may contain transparent areas. The transparency mode is enabled
by the Transparency checkbox . The way of processing translucent areas is regulated in
the Matte (Border) list . Since there are no transparent areas in our image, we will defer this
topic until Chapter 11, on preparing graphics for the Web. It also describes how to smooth the
colors of images.
The limited number of colors in the palette is only suitable for hand-drawn images. If a
photograph is transferred to an indexed format (Fig. 2.17, a), it will look like a poster with
sharp borders of colored areas (Fig. 2.17, b). Dithering algorithms are used to simulate
transition colors. By placing pixels of darker and lighter shades of the same color side by
side, you can reproduce the missing intermediate color. Dithering of indexed images can be
done in different ways, as defined in the Dither list .
Algorithm Pattern (Pattern) represents colors that are not in the palette as a set of
adjacent pixels of similar colors. The result is a kind of pixel pattern (Fig. 2.17, c). A
conspicuous pattern does not look good in photographic images. For them, it is better to
use the Diffusion algorithm(Diffusion) based on "error scattering". The idea behind the
algorithm is that each pixel in the image is assigned a color that best matches the original
along with the previous pixel. As a result, the error in the transmission of pixel colors is
scattered throughout the image and practically does not create a characteristic pattern
(Fig. 2.17, d). However, in some cases (for example, in long gradient fills) this algorithm
does not guarantee against the occurrence of patterns. In such cases, it is better to resort to
the Noise algorithm (Fig. 2.17, e).
In the Amount field, enter the strength of the smoothing. By varying this parameter, you
can change the appearance of the indexed image from "poster" to almost exactly the same
as the original. Note that the stronger the anti-aliasing, the larger the file size.
b c
d e
Fig. 2.17. Original (a), indexed image without anti-aliasing (b) and with anti-aliasing:
Pattern (c), Diffusion (d), Noise (e)
The Preserve Exact Colors checkbox forces the anti-aliasing algorithm to "bypass" pixels
whose colors are in the image's palette. The Indexed Colors image has one channel. Open
the Channels palette to make sure of this (Fig. 2.18).
Figure: 2.18. View of the Channels palette for the indexed document
Note
AdobePhotoshop also provides direct access to a palette of indexed images. It can be viewed
and edited in the ColorTable dialog box opened by the Mode list command of
the Image menu(Image) (Fig.2.19). You can add and remove colors from the palette, assign
image colors or arbitrary colors to its elements. We especially note the ability to save and load
palettes from files of a special format (with the act extension, AdobeColorTable). Saved
palettes can be used as fixed palettes when indexing a series of images. They can also be
loaded into the Swatches palette and used when editing images.
Tone correction
Even if you have your own staff of professional photographers and can get perfect quality
images for your work, at least sometimes you will have to deal with originals from a variety
of sources. We are talking about photographs from collections on CD-disks, images from
old prints, reportage photographs, etc. Collections, especially those produced by Kodak,
tend to contain excessively dark images. Old photographic materials fade from time to time,
they must have defects (scratches, spots). Amateur photographs taken with cheap cameras
very often have "wrong" colors. But if the content of the original is interesting and
expressive, then it is useless for a real creator to be afraid of difficulties. With the help of
Photoshop, you can bring even a low-quality image to a professional look. Of course there
are limitations, and there is no hope that a photograph from a newspaper fifty years ago
can be corrected to the level of studio shooting. However, the possibilities of Photoshop in
terms of improving the appearance of images are very wide. If the original is already of
good quality, the program will make it just perfect.
Attention!
It is very important that the quality of images does not suffer at the very beginning of their
"digital life" - after scanning. The higher the class of your scanner and the better the
equipment profiles are matched, the less losses will be at the initial stage.
Tone Correction
Why does one image seem full of life and the other as flat as a table, with indistinguishable
details? The answer is obvious for a photographer - for the best image quality, firstly, it
should have an optimal range of highlights and shadows, which makes the subjects more
embossed, eliminates an unpleasant gray tint. Secondly, in order to enrich the pattern with
details, an increase in contrast is required in the tonal range where they are most
abundant. These two provisions are perfectly true for image processing in Photoshop.
From the point of view of Photoshop, the tones of an image are characterized by the
brightness of pixels with fixed values from 0 to 255. That part of the full range of brightness
that is used in the image is called the tonal range of the image. The wider the tonal range,
the deeper the colors and the better the details. This is exactly the task that the highlight
and shadow correction solves. Ideally, all brightness (tone) values should be used in the
image.
If you divide the entire tonal range into three unequal parts, then the darkest part will be
called shadows, the lightest - light, and a large interval of mid-tones will be located
between them. A plot-important fragment of the image can be located in any of these parts,
where the maximum number of shades should be. Correction of tones consists in increasing
the contrast of a subject important tonal range.
The printing press does not reproduce very dark and very light colors poorly. The eye is
also designed so that areas of medium brightness are best perceived. Therefore, the
concept of correction also includes the shift of the subject-important tonal range towards
the mid-tones, if the most needed details are far in the highlights or in the shadows.
Correcting the tonal range in the Levels window
Fading photos, improper scanning, improper shooting conditions, etc. may result in dull
images. A typical example is a Bmw.jpg document from a working diskette (Figure 8.1). In
real life, a new, polished car pleases the eye with dazzling highlights on the body and dark,
almost black shadows on the tires. In the same image, there is neither white nor black -
highlights are light gray, shadows are dark gray. As a result, the composition seems to be
covered with a dirty haze and, of course, does not "fit" for an advertising poster.
In total, a digital 8-bit image has 256 brightness gradations - from black (brightness 0) to
white (brightness 255), and the pixels may be unevenly distributed among gradations. For
example, if the image has many pixels with a brightness of 100-150, then it looks average in
brightness. In a dark image, there are many pixels with low brightness, in a bright image,
with high brightness. Photoshop can build graphs of pixel brightness distribution -
histograms. By looking at the image histogram, you will immediately see which brightness
range is not involved in it and, based on this data, you can choose a correction method. In
the following exercises, we will work with the tonal range of images of different brightness.
Note
The Histogram window is used only for obtaining information about the tonal range and is
not intended for performing correction.
To fix the shortcomings of this image, we will use the Levels window . The principle of such
a correction is simple: since there are no (or very few) pixels in the edge ranges, it means
that there are no details of the corresponding brightness in the image. You set the darkest
existing pixels in the image to zero brightness, and the lightest to maximum. Then the tones
of the image are stretched to the full range of brightness. This operation is called tonal
range expansion.
Figure: 8.3. Change of input brightness levels in the Levels window (a) and image after
correction (b)
2. Move the white slider to 235. The image has become noticeably brighter and more
contrasting (Fig. 8.3, b). The program assigned the maximum brightness to all pixels, the
brightness of which was greater than 235 when the window was opened (at the input). The
rest of the brightness levels were redistributed accordingly.
3. By moving the black slider to 35, you will assign the minimum, zero brightness to all
pixels with brightness less than 35. What happens when clipping edge brightness? The
remaining levels are evenly distributed throughout the range. Since the brightness levels
are now lower, stretching produces dips, that is, some brightness levels simply do not
exist. Click OK.
4. Open the Levels window again for the corrected image. The histogram clearly shows the
dips in brightness levels. Since these dips are few, they are invisible on screen or in
print. Note that the input highlights and shadows are set back to zero.
5. If you stretch the tone range too much, the decrease in the number of semitones will
become noticeable. In the Levels box, set the input black level to 60 and white to 170. The
image looks like a poster. This defect is sometimes called pasteurization (from the English
poster).
6. To cancel the parameters set in the Levels window without closing the window, press
the Alt key. The Cancel button will turn into a Reset button . Click on it. Level shift is
canceled, but the window remains open, and you can start the correction again.
7. Click Cancel to close the dialog box without making any adjustments .
Another very common image defect is too much or too little exposure. In the first case, the
image is very light, in the second - too dark. Correction of such images consists in changing
the gamma - the middle tones of the image (gamma is measured in arbitrary units from 0 to
10). You shift the midtones towards higher or lower brightness. In this case, the tonal range
remains the same.
1. Open the Interior.jpg document (Fig. 8.4, i). As can be seen from its histogram (Fig. 8.4,
b), there are details throughout the entire brightness interval, so cutting off levels will lead
to a loss of detail in highlights. However, the peak of the histogram is in deep shadows, and
the image will benefit from getting a little lighter. Let's use the histogram of
the Levels window to correct the image gamma.
Figure: 8.4. An example of a dark image (a) and its histogram (b)
2. Open the Levels window . The gray "slider (Fig. 8.5, a) shows the position of the
midtones, that is, the gamut of the document. The gamma at the moment of opening the
window is equal to one, which is displayed in the middle input field of the Input
Level s group .
3. Move the gray slider towards the shadows. The gamma is increasing. " The image
becomes lighter (Fig. 8.5, b). Note that shadows and highlights remain unchanged.
What happens when the gamma changes? By moving the gray slider, you stretch one part
of the histogram at the expense of another. In this case, after correction, there are fewer
shades in the highlights. This is not very noticeable in the Interior.jpg image. However, if
you look more closely, you will see that as the gamma is increased, the window area
becomes less detailed and too bright (Fig. 8.6).
Figure: 8.5. Gamma correction in Levels window (a) and corrected image (b)
Fig. 8.6. Window area before and after gamma correction
Simplified level correction
Gamma correction and tonal range stretching is a very simple and effective way to correct
images with simple defects. Photoshop offers additional tools for this type of simplified
correction.
1. Go to the document Bmw.jpg. In the protocol, return to the initial state (before correcting
the levels).
3. Click OK. Save a snapshot. After that, go to the snapshot of the document, taken after the
correction in the window Levels (Levels). Most likely, you will not see the difference in
quality. Yes and no. Therefore, simple cases of correction are best done with the simplest
tool.
The Auto Levels command is even simpler and is a direct command. It is invoked either by
the Auto button of the Levels dialog box , or from the Adjust submenu of the Image menu .
3. Compare this result with the others obtained by manually adjusting levels and using
the Brightness / Contrast command .
4. Automatic correction of color images is usually not ideal. But it is more successful for
halftone illustrations. Open the Girl.jpg document and correct it with the
Auto Levels command . The image has become contrasting.
During manual correction, you clip off edge levels if there are very few pixels in them. With
automatic correction, you can set the program to cut off the percentage of pixels in the
highlights and shadows. This is very useful for removing excessively bright levels in images
to be printed and for preventing accidental scratches and smudges.
1. Press the Alt key. The Auto button in the Levels window turns into
an Options button . Clicking on it will open the Auto Range Options window (Figure 8.8).
2. The default values in this window are 0.5% for black and white. That is, with automatic
correction, the corresponding levels, which contain less than 0.5% of pixels, are considered
white in highlights, and black in shadows. As you enter different values in the fields, test
their effect on the Auto command result .
In the same Adjust submenu, there is another direct action command for adjusting levels
- Equalize . As a result of its work, edge levels are cut off quite strongly, and the remaining
pixels are distributed over the range with the greatest possible uniformity.
1. Select this command for the original Interior.jpg image. The image becomes very
bright. Pixels concentrated in dark tones are aligned across the entire brightness range.
However, the leveling effect is very rough (Figure 8.9, a). The Fade dialog box is used to
weaken the last command just issued.
2. Select the Fade command from the Edit menu , now it looks like Fade
Equalize. The Fade dialog box will open (Fig. 8.9, b). The program considers the last change
in the image as a temporary layer, the transparency and blending mode of which can be
changed. Move the Opacity slider and watch the leveling effect fade away. Set the opacity
to 58% (Figure 8.9, c).
a
c b
Fig. 8.9. Level aligned image (a), Fade window (b), and corrected image (c)
3. The Mode list contains the blending modes. Authors consider the Normal mode to be the
most acceptable . Set it and click the OK button.
4. This correction method seemed to us the most successful. Save the file in a working
folder.
Manual definition of black and white points
When correcting tones using the histogram, it is necessary to separate real image details
and random scratches and spots (artifacts). Artifact pixels can be very dark or very light,
and they contribute to the histogram. For the correct adjustment, it is often necessary to
select the darkest and lightest points - manually, in order to correct the tones for the image
itself, and not for random defects.
1. Open the Girl.jpg document. There are many artifacts in this image (Figure 8.10).
Figure: 8.10. Image and its area where artifacts are marked
2. Open the Levels dialog box . Move the Highlights slider to the left until only the darkest
areas are visible in the image. Note that these are spots (do not need to be counted) and the
area at the base of the braid on the right, which should be considered the darkest
significant area of the image. Remember its position.
3. Now move the shadow slider until only the lightest areas are visible in the image (the
fragment of the dress on the left). Also note the position of the lightest point, disregarding
even lighter scratches.
4. Select the Set Black Point tool by clicking the black eyedropper button. Click with this
tool on the darkest point you found.
5. Activate the Set White Point tool . Its button has a white eyedropper icon. Click on the
lightest point with the tool. The range of the image has been adjusted more carefully than
with the auto level correction.
Compressing the Tone Range
In the Levels window(Levels) you can perform the opposite operation - compression of the
tone range. This action is performed using the gray scale sliders (Fig. 8.11, a). You set the
output brightness levels for the image. Output levels are displayed numerically in the input
fields marked with circles. So, by moving the black slider to level 20, you are forcing
Photoshop to assign this brightness value to the black pixels (meaning the values after
adjusting the input levels). It turns out that all black pixels will turn dark gray. Moving the
white slider to 240 will assign this value to all white pixels, and they will take on a light
gray tint. The tonal range is compressed before printing. The point is that the darkest and
lightest shades cannot print well on paper. If there are many such tones in the image, then
the details will be lost. Compressing the range by a few steps will make the shadows a little
lighter and the highlights a little darker. This will improve the quality of the print. The
amount of compression depends on the quality of the paper on which you intend to print
the image. The worse the paper, the more tight the squeeze is needed.
Figure: 8.11. Output range sliders (a) and corrected image (b)
Narrowing the range is also used to visually increase the detail. An image from the
Acropol.jpg document is suitable as an example.
1. Open this document (Fig. 8.11, b). It has very dark shadows and very bright lights.
2. In the Levels window, move the output level sliders to 10 and 240. With a slight
decrease in contrast, the eye can see details better.
Tone curves
After finishing adjusting the levels, the image of the Interior.jpg document has certainly
improved. However, we found a loss of detail in highlights. If the photo generally has a
normal tonal balance, you should think about correcting only the required brightness
range. Tone curves or gradation curves are a universal tool for this work. This tool allows
you to perform simple types of correction, such as stretching and narrowing the tonal
range, gamma shift. But the main area of application of curves is fine adjustment of
levels. Let's get acquainted with the new working principle:
1. Open a document Bmw.jpg. Select the Curves command from the Adjust submenu of
the Image menu .
2. In the dialog box of the same name (Fig. 8.12) with the help of a tone curve, you can make
a tone correction. On the graph, the X-axis shows the input brightness values, and the Y-
axis shows the Output values. The input is the current brightness of the image pixels, and
the output is the new brightness you assigned, the result of the correction. If the input and
output luminance values are equal, then the curve is a straight line at an angle of 45
degrees; This is the line you see in front of you. It corresponds to no correction. If you move
the cursor within the graph, the Input and Output fields display the corresponding
brightness values in one of two modes.
By default, RGB images are set to luminance display mode. In this case, there are dark tones
on the left (black has a value of 0), and on the right are light tones (white has a value of
255). The set mode is conventionally denoted by a tone stretch in the strip under the graph,
in the center of the strip there is a mode switch.
1. Click the double arrow in the center of the strip. The direction of the stretch marks has
changed. Now the upper right corner corresponds to lower brightness, and the lower left -
to higher brightness. This direction is taken for images in the CMYK model.
2. Click again on the arrow to return the direction of the brightness counting to the
previous position.
Image contrast and brightness
The simplest way to adjust using curves is to adjust contrast and brightness. To begin with,
let's perform the simplest correction - increase the image contrast.
1. Move the bottom point of the curve to the right and the top point to the left. This will cut
out the darkest and lightest tones in the image. Shadows are darker and highlights are
lighter. When you adjusted the position of the black and white sliders in
the Levels window and the contrast slider in the Brightness / Contrast window (Figure
8.13), you practically increased the slope of the tone curve.
Figure: 8.13. The shape of the tone curve to increase the contrast
2. Move the bottom point of the curve even more to the right, and the top - lower, so that
the slope of the curve remains the same as you set in step 1. The image darkens, you
decreased its brightness. Back mixing will increase the brightness of the image. It is this
action that is performed by the Brightness slider in the Brightness / Contrast dialog
box (Fig. 8.14).
Mid tone correction
The Levels tool divides the entire tone curve into three tonal intervals - shadows,
highlights, and midtones. Level correction is quite achievable by means of curves.
Note
In the Curves window, you can define much more tonal intervals, therefore, the possibilities
for correction are wider.
Let's draw a parallel between working in the Levels window and Curves . The action
performed by the black and white input level sliders is to adjust the contrast. Correction of
midtones (shifting the gray slider in the Levels window ) is performed by bending the tone
curve down or up
...
1. Open the Desert.jpg file. Most of the details in this image are painted in light colors (Fig.
8.15). Place the cursor at the midpoint of the curve and move it down (Fig. 8.16, a). The
tone curve for light image correction is concave.
Figure: 8.15. Original light image (a) and its histogram (b)
2. Open the unedited Interior.jpg file. This image contains most of the dark tones (see
Figure 8.4).
Figure: 8.16. The shape of the tone curve for the correction of the light image (a) and the
result of the correction (b)
3. Call the Curves dialog box and, by creating a point in the center of the curve, move it
up. The image has become somewhat lighter, details have appeared in dark tones. To
correct a dark image, the tone curve is convex (Figure 8.17). Aim for optimal brightness
and save the image in the working folder.
Figure: 8.17. The shape of the tone curve for the correction of a dark image (a) and the
result of the correction (b)
4. Open the Bmw.jpg file. This is a balanced image. It has a maximum of plot important
details in the middle of the range (see Fig. 8.1).
5. Open the Curves dialog box . Set a point in the center of the curve, fixing the position of
the neutral tone.
6. Click at the intersection of the tone curve and the side of the lower-left square: you have
locked a point equal to a quarter of the tonal range (shadow).
Note
Extra points can be deleted by grabbing and dragging them outside the graph, or by clicking
on them while holding down the Ctrl key, or by pressing the Delete key.
7. Set the second point symmetrically to the first one relative to the middle of the tone
curve at its intersection with the corner of the upper right square (this is the area of
highlights).
Note
Please note that the point just placed looks like a black square (since it is currently selected),
and the previous one is a light one. To select a point on the tone curve, just click on it with the
mouse.
8. Drag the first point down and the second up. The curve has taken the shape of the letter
"S". It is this shape of the tone curve that is used to enhance contrast. Its central slope
serves as a measure of contrast. See how the image has changed: the gray plaque has been
removed and details have appeared in the middle tones (Fig. 8.18).
Figure: 8.18. The shape of the tone curve for correcting a balanced image (a) and the result
of the correction (b)
Note that you are increasing the contrast in the midtones by cutting off highlights and
shadows, not roughly as with the Brightness / Contrast command or shifting the black
and white sliders in the Levels window , but more subtly by changing the slope curve, you
adjust both the degree of contrast and the percentage of tones to be cut off.
When creating a curve, you can set points on different parts of it.
1. Go to the document Interior.jpg, edited by tones. Move the cursor over the image. It will
take the form of an eyedropper (Figure 8.19). Click the mouse button and look at the
graph. The movement of the cursor over the image is marked on the tone curve by a dot
with a circle, the position of which corresponds to the brightness of the pixels under the
cursor.
2. Press the Ctrl key and click on the image. A point of corresponding brightness appeared
on the curve. In this way, color ranges can be marked very accurately.
Figure: 8.19. Displays the current cursor position on the tone curve
When you adjust the overall tonal range (say, lighten a dark image), there are three things
to do:
measure the range of brightness in the most meaningful areas of the image;
set a point on the curve in the center of the measured range;
lighten or darken the image. The concavity and convexity of the curve should
correspond to the meaningful tone interval.
The main effect of this method of action will be applied to the most important area of the
image.
1. Open the tinted Interior.jpg image and then the Curves dialog box . In this image, we are
satisfied with the overall tonal range, we do not want to make it darker or
lighter. Therefore, set a point in the middle of the curve and do not move it.
2. Move the cursor over the window area. Thus, you will find out the interval of tones in
which you need to darken and increase contrast (Fig. 8.20).
3. Place a point approximately in the middle of the found interval and move it downward,
making the area concave. Window details became visible, candles appeared, which were
previously lost in a bright spot of light.
On the other hand, the rendering of shades has deteriorated and the contrast in the
midtones and shadows has decreased. This is the inevitable payment for our changes. If
you increase the contrast in one tonal range, then it will decrease in the other. We will have
to change the shape of the entire curve so that we can more accurately approximate it to
the original in all areas except the corrected one. Then the image will remain unchanged,
with the exception of the corrected tonal range.
4. Set points on the curve and edit its shape. In our case, the best correction option was as
in Fig. 8.21.
Consider another exercise to correct the tonal range for an image with a defect in the
midtones.
1. Open the Street.jpg file (Fig. 8.22). Obviously, the image is well balanced in highlights and
shadows, and the brightness of the mid tones is not satisfactory. However, it looks bad
because of the low contrast in a fairly narrow mid-tone range: the entire foreground of the
image and the pavement look gray and undeveloped (devoid of detail).
The procedure in this case is the same: first, let's try to protect areas of light and shadow
from changes. Then we will find the required gap for correction and achieve the optimal
ratio of contrast and brightness.
Figure: 8.21. Curve view at correction of a narrow interval and correction result
2. Move the cursor over the "blind" areas of the image and see which part of the tone curve
they correspond to. You should have a tonal range of 140-170. This is where the correction
should be made (Figure 8.22).
Tip
If you click on the image while holding down the Ctrl key, a point will be set on the curve that
corresponds to the brightness of the pixels at the point you clicked. Thus, you can very
accurately determine the brightness interval for correction.
3. Set two points in the highlights and in the shadows. By this you have limited the areas
where changes will not be carried out (Fig. 8.23, a).
4. Place the cursor at the bottom point of the problem interval (this is approximately in the
center of the curve (Fig. 8.23, b) and press the left mouse button. A new point will appear
on the curve. Move it down, observing the changes in the image. The curve has acquired an
increasing contrast S- a shaped form (Fig. 8.23, c), but not along its entire length, but only
on the low-contrast interval of the tonal range that we are interested in. Adjust the slope of
the curve for the best result.
Tip
By default, the entire curve field is divided into 16 squares. If you need a more precise
coordinate grid, Alt-click in the graph area. The grid will become twice as common. If the area
of the graph seems to you insufficient for such subtle manipulations, click on the maximize
button of the Curves dialog box , after which it will increase, however, it will also close most of
the program window.
5. Low-contrast areas disappeared, but highlights and shadows remained unchanged, but
the image became too dark. This drawback is also subject to the Curves tool . Select all the
points you have set on the curve by sequentially clicking on them with the mouse while
holding down the Shift key.
6. Drag any of the selected points up one third of the square. The rest will move along with
it. The image will become lighter.
7. The shape that the tone curve has taken (Fig. 8.24, b) is actually not ideal for this
image. In this form, it has lost detail in the highlights. Try to achieve an even better
correction yourself. When you are happy with the results, click OK.
Figure: 8.24. The corrected image (a) and its curve (b)
When processing a large set of documents of the same type with the same errors, there is a
need to preserve the correction parameters (tone curve). The Adobe Photoshop program
provides this opportunity.
1. Click the Save button to the right of the graph. In the dialog box that opens, name the file
Street.acv and save it in your working folder. If you want to reuse this curve, you can open
the Curves dialog box and load it again using the Load button .
2. Save the Street.jpg document with the same name in your working directory.
The Curves dialog box is a very powerful and complex tool that allows you to perform
tonal adjustments of any type and degree of complexity, and the most accurate (including
setting black and white points). Take the time to master this dialog box, in the future it will
allow you to win many times in effort and time.
Note
In the Curves dialog box, a maximum of fifteen tone intervals are allowed. It is difficult to call
this a limitation, since five or seven intervals are more than enough for the needs of correction
of any complexity.