Photoshop.CS.Bible [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Photoshop.CS.Bible [Electronic resources] - نسخه متنی

Deke McClelland

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید






Whole Image Calculations

Image Apply Image and Image Calculations provide access to Photoshop's channel operations, which composite one or more channels with others according to predefined mathematical calculations. Once hailed as Photoshop's most powerful capabilities, channel operations have been eclipsed by the standard and more accessible functions available from the Layers and Channels palettes. There may come a day when Adobe decides to scrap Apply Image and Calculations altogether. But until that day, I will dutifully document them both.

The Apply Image and Calculations commands allow you to merge one or two identically sized images using 18 of the 23 blend modes discussed earlier plus two additional modes, Add and Subtract. In a nutshell, the commands duplicate the process of dragging and dropping one image onto another (or cloning an image onto a new layer) and then using the blend mode and the Opacity settings in the Layers palette to mix the two images together.

Although Apply Image and Calculations are more similar than different, each command fulfills a specific — if not entirely unique — function:



Apply Image: This command takes an open image and merges it with the foreground image (or takes the foreground image and composites it onto itself). You can apply the command to either the full-color image or one or more of the individual channels.



Calculations: The Calculations command works on individual channels only. It takes a channel from one image, mixes it with a channel from another (or the same) image, and puts the result inside an open image or in a new image window.



The primary advantage of these commands over other, more straightforward compositing methods is that they allow you to access and composite the contents of individual color channels without a lot of selecting, copying and pasting, cloning, floating, and layering. You also get two extra blend modes, Add and Subtract, which may prove useful on a rainy day.

The Apply Image and Calculations commands provide previewing options, so you can see how an effect will look in the image window. But thanks to the sheer quantity of unfriendly options offered by the two commands, I suggest that you use them on only an occasional basis. The Calculations command can be a handy way to combine masks and layer transparencies to create precise selection outlines. Apply Image offers the unique capability to composite images in different color models. For example, you could mix a layer or channel from an RGB image with another image in the CMYK mode.

But if your time is limited and you want to concentrate your efforts on learning Photoshop's most essential features, feel free to skip Apply Image and Calculations. I assure you, you won't be missing much.


The Apply Image command


Channel operations work by taking one or more channels from an image, called the source, and duplicating them to another image, called the target. When you use the Apply Image command, the foreground image is always the target, and you can select only one source image. Photoshop then takes the source and target, mixes them together, and puts the result in the target image. Therefore, the target image is the only image that the command actually changes. The source image remains unaffected.

When you choose Image Apply Image, Photoshop displays the dialog box shown in Figure 13-47. Notice that you can select from a pop-up menu of images to specify the Source, but the Target item — listed just above the Blending option — is fixed. This is the active layer in the foreground image.


Figure 13-47: The Apply Image dialog box lets you mix one source image with a target image and make the result the new target.

If this sounds a little dense, think of it this way: The source image is the floating selection and the target is the underlying original. Meanwhile, the Blending options are the blend modes pop-up menu and the Opacity value in the Layers palette.

Using the Apply Image command is a five-step process. You can always simply choose the command and hope for the best, but you'll get the most use out of it if you do the following.

STEPS: Applying the Apply Image Command




Open the two images that you want to mix. If you want to mix the image with itself to create some effect, just open the one image.



Make sure that the two images are exactly the same size, down to the last pixel. Use the crop tool and Image Size command as necessary. (You don't have to worry about this step when mixing an image with itself.)



Inside the target image, switch to the channel and layer that you want to edit. If you want to edit all channels, press Ctrl+tilde (z -tilde on the Mac) to remain in the composite view.





Tip

If you're thinking of editing a single channel, I recommend you go ahead and display all channels on screen. For example, after pressing Ctrl+1 (z -1) to switch to the red channel, click in front of the RGB item in the Channels palette to display the eyeball icon and show all channels. Only one channel is active, but all are visible. This way, you can see how your edits inside the Apply Image dialog box affect the entire image, not just the one channel.




Select the portion of the target image that you want to edit. If you want to affect the entire image, don't select anything.



Choose Image Apply Image and have at it.



Obviously, that last step is a little more difficult than the text lets on. In fact, it takes an entire section to explain all the stuff you'll need to know. That section is coming up next.

The Apply Image options


The following list explains how to use each and every option in the Apply Image dialog box:



Source: The Source pop-up menu contains the name of the foreground image as well as any other images that are both open and exactly the same size as the foreground image. If the image you want to merge is not available, you must not have been paying much attention to Step 2. Press Escape to cancel, resize and crop as needed, choose Image Apply Image, and try again.



Layer: This pop-up menu lists all layers in the selected source image. If the image doesn't have any layers, Background is your only option. Otherwise, select the layer that contains the prospective source image. Select Merged to mix all visible layers in the source image with the target image.



Channel: Select the channels that you want to mix from this pop-up menu. Both composite views and individual color and mask channels are included. Keep in mind that you'll be mixing these channels with the channels that you made available in the target image before choosing the command.

For example, if the target image is an RGB image shown in the full-color composite view, and you choose RGB from the Channel pop-up menu in the Apply Image dialog box, Photoshop mixes the red, green, and blue channels in the source image with the corresponding red, green, and blue channels in the target image. However, if you switched to the red channel before choosing Apply Image and then selected the RGB option, the program mixes a composite grayscale version of the RGB source image with the red channel in the target and leaves the other target channels unaffected.



Selection, Transparency, and Layer Mask: If a portion of the source image is selected, the Channel pop-up menu offers a Selection option, which lets you apply the selection outline as if it were a grayscale image, just like a selection viewed in the quick mask mode. If you selected a specific layer from the Layer pop-up menu, you'll find a Transparency option that represents the transparency mask. If the layer includes its own layer mask, a Layer Mask option also appears.

None of the three options is particularly useful when you work in the composite view of the target image; you'll usually want to apply the Selection, Transparency, or Layer Mask option only to a single channel, as described in "The Calculations command" section toward the end of this chapter.



Invert: Select this check box to invert the contents of the source image before compositing it with the target image.



Target: You can't change this item. It merely shows which image, which channels, and which layers are being affected by the command.



Blending: This pop-up menu offers access to 18 of the blend modes I discussed in the "Blend Modes" section earlier in this chapter. The Dissolve, Hue, Saturation, Color, and Luminosity options are missing. Two additional options, Add and Subtract, are discussed in the "Add and Subtract" section later in this chapter.



Opacity: By now, you're well aware of how this one works.



Preserve Transparency: When you're editing a layer in the target image — that is, you activated a specific layer before choosing Image Apply Image — the Preserve Transparency check box becomes available. Select it to protect transparent portions of the layer from any compositing, much as if the transparent portions were not selected and are therefore masked.



Mask: Select this option to mask off a portion of the source image. I already mentioned that you can specify the exact portion of the target image you want to edit by selecting that portion before choosing the Apply Image command. But you can also control which portion of the source image is composited on top of the target through the use of a mask. When you select the Mask check box, three new pop-up menus and an Invert check box appear at the bottom of the Apply Image dialog box. For complete information on these options, see the next section.




Compositing with a mask


The Mask option in the Apply Image dialog box provides a method for you to import only a selected portion of the source image into the target image. Select the Mask check box and choose the image that contains the mask from the pop-up menu on the immediate right. As with the Source pop-up menu, the Mask menu lists only those images that are open and happen to be the exact same size as the target image. If necessary, select the layer on which the mask appears from the Layer pop-up menu. Then select the specific mask channel from the final pop-up menu. This doesn't have to be a mask channel; you can use any color channel as a mask.

After you select all the necessary options, the mask works like so: Where the mask is white, the source image shows through and mixes in with the target image, just as if it were a selected portion of the floating image. Where the mask is black, the source image is absent. Gray values in the mask mix the source and target with progressive emphasis on the target as the grays darken.

If you prefer to swap the masked and unmasked areas of the source image, select the Invert check box at the bottom of the dialog box. Now, where the mask is black, you see the source image; where the mask is white, you don't.





Tip

You can even use a selection outline or layer as a mask. If you select some portion of the source image before switching to the target image and choosing Image Apply Image, you can access the selection by choosing Selection from the Channel pop-up menu at the very bottom of the dialog box. Those pixels from the source image that fall inside the selection remain visible; those that do not are transparent. Use the Invert check box to create an inverse of the selection. To use the boundaries of a layer selected from the Layer pop-up menu as a mask, choose the Transparency option from the Channel menu. Where the layer is opaque, the source image is opaque (assuming that the Opacity option is set to 100 percent, of course); where the layer is transparent, so too is the source image.



Add and Subtract


The Add and Subtract blend modes found in the Apply Image dialog box (and also in the Calculations dialog box) add and subtract the brightness values of pixels in different channels. The Add option adds the brightness value of each pixel in the source image to that of its corresponding pixel in the target image. The Subtract option takes the brightness value of each pixel in the target image and subtracts the brightness value of its corresponding pixel in the source image. When you select either Add or Subtract, the Apply Image dialog box offers two additional option boxes, Scale and Offset. Photoshop divides the sum or difference of the Add or Subtract mode, respectively, by the Scale value (from 1.000 to 2.000), and then adds the Offset value (from negative to positive 255).

Perhaps an equation will help. Here's the equation for the Add blend mode:


Resulting brightness value = (Target + Source) Scale + Offset


And here's the equation for the Subtract mode:


Resulting brightness value = (Target – Source) Scale + Offset


If equations only confuse you, just remember this: The Add option results in a destination image that is lighter than either source; the Subtract option results in a destination image that is darker than either source. If you want to darken the image further, raise the Scale value. To darken each pixel in the target image by a constant amount, which is useful when applying the Add option, enter a negative Offset value. If you want to lighten each pixel, as when applying the Subtract option, enter a positive Offset value.

Applying the Add command


The best way to demonstrate how the Add and Subtract commands work is to offer examples. To create the effects shown in Figure 13-7. The difference is, for purposes of the Apply Image command, both photographs start out in separate image windows.


Figure 13-48: Two applications of the Add blend mode from inside the flat Tranquil Background image (top and middle), each subject to different Scale and Offset values. When adding an image into an independent layer, Add always preserves transparency (bottom).


Figure 13-49: Two applications of the Subtract command on the Tranquil Background image, one subject to Scale and Offset values of 1 and 0 (top) and the other subject to values of 1.2 and 180 (middle). When subtracting into the Michelangelo Face image, Subtract not only respects the transparency mask but also delivers a very different result (bottom).

After switching to the Tranquil Background image and choosing Image Apply Image, I selected the Michelangelo Face image from the Source pop-up menu. I selected the Add option from the Blending pop-up menu and accepted the default Scale and Offset values of 1 and 0, respectively, to achieve the first example in Figure 13-48. The face went blindingly white, much lighter than it would under any other blend mode, even the Dodge modes. To improve the quality and detail of the image, I changed the Scale value to 1.2 to slightly downplay the brightness values and entered an Offset value of –60 to darken the colors uniformly. The result of this operation is the more satisfactory image shown in the second example of the figure.

For the sake of comparison, the final example in Figure 13-48 shows what happens when I introduce the Tranquil Background image into the Michelangelo Face layer using the Add mode, with a Scale of 1.2 and an Offset of –60. Note that Add automatically respects the transparency mask of the face layer, regardless of whether or not you select the Preserve Transparency check box.

Applying the Subtract command


To create the first example in Figure 13-49, I selected the Subtract option from the Blending pop-up menu, once again accepting the default Scale and Offset values of 1 and 0, respectively. This time, the face turned pitch black because I subtracted the light values of the face from the light values in the background image, leaving no brightness value at all. Meanwhile, shadow details such as the eyes and lips had little effect on the background because shadows range from very dark to black. Subtracting black from a color is like subtracting 0 from a number — it leaves the value unchanged.

The result struck me as too dark, so I lightened it by raising the Scale and Offset values. To create the second image in Figure 13-49, I upped the Scale value to 1.2, just as in the second Add example, which actually darkened the image slightly. Then I raised the Offset value to 180, thus adding 180 points of brightness value to each pixel. This second image is more likely to survive reproduction with all detail intact.

Subtracting the other direction — that is, applying the Subtract mode inside the Michelangelo Face image — produces a radically different effect, as verified by the final example of Figure 13-49. The mountains are generally quite dark, so they have little effect when subtracted from the face. In fact, by Subtract standards, this is a remarkably successful blend.


The Calculations command


The Calculations command performs a different function than Apply Image, although its options are nearly identical. Rather than compositing a source image on top of the current target image, Image Calculations combines two source channels and puts the result in a target channel. You can use a single image for both sources, a source and the target, or all three (both sources and the target). Although Photoshop previews the effect in the foreground image window, the target doesn't have to be the foreground image. The target can even be a new image. But the biggest difference is that instead of affecting an entire full-color image, as is the case with Apply Image, the Calculations command affects individual color channels. Only one channel changes as a result of this command.

Choosing Image Calculations displays the dialog box shown in Figure 13-50. Rather than explaining this dialog box option by option — I'd just end up wasting 35 pages and repeating myself every other sentence — I'll attack the topic in a less structured but more expedient fashion.


Figure 13-50: Use the Calculations command to mix two source channels and place them in a new or an existing target channel.

When you arrive at the dialog box, you select your source images from the Source 1 and Source 2 pop-up menus. As with Apply Image, the images have to be exactly the same size. You can composite individual layers using the Layer menus. Select the channels you want to mix together from the Channel options. In place of the full-color options — RGB, Lab, CMYK — each Channel menu offers a Gray option, which represents the grayscale composite of all channels in an image.

The Blending pop-up menu offers the same 20 blend modes — including Add and Subtract — found in the Apply Image dialog box. However, it's important to keep in mind how the Calculations dialog box organizes the source images when working with blend modes. The Source 1 image is equivalent to the source when using the Apply Image command (or the floating selection when compositing conventionally). The Source 2 image is equivalent to the target (or the underlying original). Therefore, choosing the Normal blend mode displays the Source 1 image. The Subtract command subtracts the Source 1 image from the Source 2 image.

Half of the blend modes perform identically regardless of which of the two images is Source 1 and which is Source 2. The other half — including Normal, Overlay, Soft Light, and Hard Light — produce different results based on the image you assign to each spot. But as long as you keep in mind that Source 1 is the floater — hey, it's at the top of the dialog box, right? — you should be okay.





Tip

The only mode that throws me off is Subtract, because I see Source 1 at the top of the dialog box and naturally assume that Photoshop subtracts Source 2, which is underneath it. But wouldn't you know, this is exactly opposite to the way it really works. If you find yourself similarly confused and set up the equation backwards, you can reverse it by selecting both Invert options. Source 2 minus Source 1 results in the same effect as an inverted Source 1 minus an inverted Source 2. After all, the equation (255 – Source 1) – (255 – Source 2), which represents an inverted Source 1 minus an inverted Source 2, simplifies down to Source 2 – Source 1. Then again, if math isn't your strong suit, don't worry. I was just showing my work.


As in the Apply Image dialog box, you can specify a mask using the Mask options in the Calculations dialog box. The difference here is that the mask applies to the first source image and protects the second one. So where the mask is white, the two sources mix together normally. Where the mask is black, you see only the second source image.

The Result option determines the target for the composited channels. If you select New Document from the Result pop-up menu, as in Figure 13-50, Photoshop creates a new single-channel image. Alternatively, you can stick the result of the composited channels in any channel inside any image that is the same size as the source images.


Combining masks


As described for the Apply Image command, the Channel pop-up menus may offer Selection, Transparency, and Layer Mask as options. But here they serve a greater purpose. You can composite layer masks to form selection outlines, selection outlines to form masks, and make all sorts of other pragmatic combinations.

Figure 13-51 shows how the Calculations command sees selected areas. The figure starts off with a photograph by Marty Snyderman for the Corbis image library. Next we see two selections, one for the mother manatee and one for wee little Manatee Jr. Whether you're working with masks, selection outlines, transparency masks, or layer masks, the Calculations command sees the area as a grayscale image. So in Figure 13-51, white represents selected or opaque areas, and black represents deselected or transparent areas.


Figure 13-51: An underwater photograph, followed by two selections expressed as grayscale images (a.k.a. masks). The mommy manatee will serve as our first source; the baby manatee will be the second.

Assuming that I've chosen Image Calculations and selected the images using the Source 1 and Source 2 options, the only remaining step is to select the proper blend mode from the Blending pop-up menu. Screen, Multiply, and Difference are the best solutions. Figure 13-52 shows the common methods for combining selection outlines. In the first example, I added the two together using the Screen mode, just as in the preceding steps. In fact, screening masks and adding selection outlines are equivalent operations. To subtract the Source 1 selection from Source 2, I inverted the former (by selecting the Invert check box in the Source 1 area) and applied the Multiply blend mode. To find the intersection of the two masks, I simply applied Multiply without inverting.


Figure 13-52: Here I combined the manatee masks using the Calculations command in concert with the Screen and Multiply modes, simulating the effects of adding, subtracting, and finding the intersection of two selection outlines.

The Calculations command doesn't stop at the standard three — add, subtract, and intersect. Figure 13-53 shows three methods of combining selection outlines that are not possible using single keystroke operations. For example, if I invert the Source 1 mask and combine it with the Screen mode, it's like inversing the mommy manatee selection and adding it to the baby. The Difference mode adds the manatee selections but subtracts the area where they overlap, an operation known as exclusion. And inverting Source 1 and then applying Difference retains the intersection, subtracts the areas that do not intersect, and selects the area outside the manatees — which is equivalent to excluding two selections and then inversing the result. These may not be options you use every day, but they are extremely powerful if you can manage to wrap your brain around them.


Figure 13-53: Three nontraditional ways to combine selection outlines, all greatly facilitated by the Calculations command.

/ 143