Chapter 10. Using Transformations

<feature><title>What You’ll Learn in This Hour:</title> <objective>

Resizing

</objective>
<objective>

Rotating

</objective>
<objective>

Flipping

</objective>
<objective>

Skewing, Distorting, and Changing Perspective

</objective>
<objective>

Using Free Transform

</objective>
<objective>

Warping and Liquifying

</objective>
</feature>

When you transform something, you change it completely without turning it into something else. This concept applies in design, math, and even Photoshop. Transformations in Photoshop are geometric changes that you can make to an entire image or to just part of it, without turning it into something it’s not. They include rotating, scaling, flipping, skewing, and more—and it’s time for you to learn how to use them for your own purposes. You might need to make an object bigger or smaller, or you might need to straighten a tilted horizon. Perhaps you simply need to make your photo’s subject face left instead of right or flip an object upside down. With a few mouse clicks or a couple of simple commands, you can make all this happen.

Resizing

Technically, moving an object counts as transforming it, but in Photoshop, the most basic transformation you can perform is to resize an object, whether you’re making it smaller or larger. You can resize the entire image, or you can select part of the image and resize just the selected area. Or you can resize the image’s canvas, which leaves the image the same size but gives you more room to work with around its edges.

Resizing an Image

To resize an image, start by choosing Image, Image Size; you can see the Image Size dialog in Figure 10.1. The Pixel Dimensions area shows you the current size of the picture in either pixels or percentages; choose the unit you prefer from either pop-up menu, and the other pop-up changes to match. Below that, you can see the image’s print size in inches, centimeters, millimeters, points, picas, or columns, based on the specified resolution, and also as percentages of the current size. For example, an image that’s 600 pixels wide at a resolution of 300 pixels per inch will be 2 inches wide when printed, so you’ll see a Width value in the Document Size area of 2 inches. As with the Pixel Dimensions pop-up menus, the Width and Height unit pop-ups always match each other—if you change one, the other automatically switches along with it.

The Image Size dialog shows you how big the image is in terms of pixels, along with the size at which it will print based on its current resolution.

Figure 10.1. The Image Size dialog shows you how big the image is in terms of pixels, along with the size at which it will print based on its current resolution.

When you first open the Image Size dialog, if you set the Width and Height dimensions in either the Pixel Dimensions area or the Document Size area to Percent, you’ll see the default setting of 100%. To enlarge or reduce the image, just make sure that Constrain Proportions is checked at the bottom of the dialog, and then enter a new percentage in one of the fields and click OK. Because you’ve elected to constrain the image to its existing proportions, the other number changes to give you the correct percentage of enlargement or reduction. For now, don’t worry too much about the Resample Image check box; just make sure that its pop-up menu is set to Bicubic. You’ll learn more about resampling in Hour 23, “Printing and Publishing Your Images.”

The third check box at the bottom of the Image Size dialog controls an essential feature if you have applied a style such as a drop shadow or embossing to an object in your picture. When you check the Scale Styles box, Photoshop makes sure that the size of the shadow or the height of the embossing remains proportional to the rest of the resized picture. You’ll want to leave this box checked 99.9% of the times you use the Image Size dialog.

As you make changes in the Document Size area, Photoshop automatically updates the numbers shown in the Pixel Dimensions area at the top of the dialog, and vice versa. You can use either set of entry fields to make your changes; the result is the same either way.

Resizing a Canvas

Resizing the canvas instead of the image itself enables you to add a frame around an image or even change its proportions—remember, you don’t have to add the same amount of extra space on all four sides. To resize the canvas, choose Image, Canvas Size and specify the height and width you want for the canvas in the dialog (see Figure 10.2). You can specify a measurement unit using the pop-up menus, just the way you can in the Image Size dialog. Photoshop calculates and displays the new file size as soon as you enter revised numbers in the dialog’s New Size area.

The Canvas Size dialog enables you to enlarge or reduce the image’s canvas without affecting the size of objects within the picture.

Figure 10.2. The Canvas Size dialog enables you to enlarge or reduce the image’s canvas without affecting the size of objects within the picture.

Click an Anchor proxy box to determine how the image will be positioned within the resized canvas. If you click in the middle, the picture is centered on the enlarged canvas. Click in any of the other boxes to indicate where you want the existing image to be placed relative to the enlarged or reduced canvas area. Figure 10.3 shows the result of anchoring an image at the top center of the canvas. The image size hasn’t actually changed, but the canvas is bigger, making room for the type I’ve added. The final result is on the right.

I started designing this logo with a square image of a fancy tile. Then I increased the image’s canvas size as shown to make room for the type in the final logo.

Figure 10.3. I started designing this logo with a square image of a fancy tile. Then I increased the image’s canvas size as shown to make room for the type in the final logo.

Resizing a Selected Area

You can also resize an object on a layer or a selected area of an image. To do so, first activate the layer or select the part of the image that you want to resize. If you’re creating a selection, use whichever Selection tool is most appropriate for the object you’re trying to select. With the selection marquee active, choose Edit, Transform, Scale. A box with corner and side handles—it looks like the cropping box—appears around your selected object (see Figure 10.4). Drag any of the corner “handles” on the box while pressing Shift to change the size of the selection while maintaining its proportions. If you drag the side handles of the box, you’ll stretch the selection’s height or width accordingly.

I drew a selection marquee around the metal tag on one of the jars and dragged the lower-right corner to enlarge it.

Figure 10.4. I drew a selection marquee around the metal tag on one of the jars and dragged the lower-right corner to enlarge it.

Content-Aware Resizing

One of the coolest new features in Photoshop CS4 is the seemingly miraculous ability to resize images without resizing their contents. Content-aware scaling is based on work done by scientists Ariel Shamir and Shai Avidan, who turned the normal way of resizing images on its head. Ordinarily, image data is removed in rows and columns of pixels. Shamir and Avidan figured out how to calculate which areas of the image contain the least detail and then remove winding paths of pixels within those areas instead of straight lines of pixels. Basically, when you use this method of resizing, the major elements of the photo stay the same size while the spaces between are enlarged or reduced.

To scale a selection or layer using this method, first make the selection or activate the layer, then choose Edit, Content-Aware Scale. Drag the handles around the selection to enlarge or reduce it (see Figure 10.5). Press Shift as you drag if you want to maintain the selection’s existing proportions. When you’re done, click the Cancel or Commit button.

As it scales this image of two derelict buses (left), Photoshop is smart enough to figure out that I won’t mind if it reduces the size of the road, the trees, and the utility pole (right), because the buses are what I really care about.

Figure 10.5. As it scales this image of two derelict buses (left), Photoshop is smart enough to figure out that I won’t mind if it reduces the size of the road, the trees, and the utility pole (right), because the buses are what I really care about.

Several options are available when you’re using content-aware scaling. The first half of the Options bar looks just the way it does when you’re using Free Transform, but then you’ll see some new settings:

  • Amount: You can use a combination of content-aware scaling and normal scaling by entering a percentage for content-aware scaling.

  • Protect: If you want to make sure that specific areas in the image are protected, create an alpha channel that’s white in those areas and then choose it from the pop-up menu.

  • Protect Skin Tones: This button, which looks like a little person, tells Photoshop to try to preserve the shapes of regions that contain skin tones; this is intended to keep people from being transformed.

Note: The Bad News

Content-aware scaling doesn’t work on adjustment layers, layer masks, individual channels, Smart Objects, 3D layers, video layers, or layer groups, and you also can’t use it when you have more than one layer selected in the Layers panel.

Rotating

You might need to rotate an image for many reasons. If you have a scanned picture or a digital camera image that should be vertical but opens as a horizontally oriented picture, rotating it 90° corrects the problem. Then again, because you’re not a computer, you might not have been holding your camera level when you took the picture. In this case, you’ll need to rotate the picture by just a few degrees to fix it.

Note: They Have Been Transformed

If you have used a much older edition of Photoshop, you might look for the Transform commands on the Layer menu. But since Photoshop 5, they’ve lived in the Edit menu.

Rotate 180° and 90° Clockwise or Counterclockwise

To rotate the entire image, choose Image, Image Rotation and pick an option from the submenu shown in Figure 10.6. Choose 90° clockwise (CW) or counterclockwise (CCW) if you simply want to straighten a sideways image, or 180° if you’ve somehow brought in the picture upside down.

The Image Rotation submenu seems compact, but it contains all the commands you’ll need to rotate or flip your entire image.

Figure 10.6. The Image Rotation submenu seems compact, but it contains all the commands you’ll need to rotate or flip your entire image.

Rotate by Degrees

To rotate the canvas by a number of degrees other than 90° or 180°, choose Image, Image Rotation, Arbitrary to bring up a dialog like the one shown in Figure 10.7. Enter the number of degrees to rotate the image. If you’re not sure, guessing is okay. If your first try doesn’t pan out, you can always undo and try again with a different number of degrees or a different direction. Click a radio button to indicate the direction of rotation: clockwise (CW) or counterclockwise (CCW). Then click OK to rotate the picture.

You can even rotate by fractions of a degree.

Figure 10.7. You can even rotate by fractions of a degree.

If there’s a good straight horizontal line in your picture, you won’t need to guess at the right number of degrees. You can use the Ruler tool to determine the exact amount of rotation needed. Switch to the Ruler tool and draw a measuring line along the image’s horizon or another line that should be level; then choose Image, Image Rotation, Arbitrary. Photoshop inserts the right number of degrees in the Angle field, based on your measurement, so all you have to do is click OK.

 

Rotate a Selected Area

You can rotate a selection (as opposed to turning the whole canvas) essentially the same way you resize one. First, select the area you want to rotate. Then choose Edit, Transform, Rotate; again, Photoshop puts a bounding box around your selection. Drag any of the corner handles to rotate the selection around its center point, indicated by the target-shaped object in the middle of the selection in Figure 10.12. To rotate the selection off-center, drag the center point to where you want it, and then drag a handle to rotate the selection. The center point stays where it is, even if it’s no longer really at the center of the selection, and the rest of the selection rotates around that point.

Drag any corner point to rotate the selection.

Figure 10.12. Drag any corner point to rotate the selection.

Note: Now You See It

Don’t worry about the Ruler tool’s measuring line obscuring your image, by the way. As soon as the Rotate Arbitrary command is executed, the measuring line disappears.

Flipping

When you flip an image, you reverse it so that you see a mirror image. You can flip a selection or an entire image horizontally or vertically. Figure 10.13 shows both; note that flipping an image vertically does not yield the same result as rotating it 180°.

The top pair of words has been flipped horizontally, and the bottom pair has been flipped vertically.

Figure 10.13. The top pair of words has been flipped horizontally, and the bottom pair has been flipped vertically.

Flipping (also called flopping in the printing industry) is different from rotating because it changes the orientation of the image, turning it backward relative to the original. Of course, sometimes you need to both flip and rotate an image or selected object to get it oriented the way you want it. For comparison purposes, Figure 10.14 shows the effects of rotation. To make this composition, I typed the word Rotate and copied it, rotating each copy.

For each copy of the word Rotate, I chose Edit, Transform, Rotate, and then moved the center point of the selection to the center of the image so that the copies would fan out from the middle.

Figure 10.14. For each copy of the word Rotate, I chose Edit, Transform, Rotate, and then moved the center point of the selection to the center of the image so that the copies would fan out from the middle.

Tip: To Flip or Not to Flip

You can safely flip almost any image, as long as nothing in it that would give the viewer a clue. You can’t flip a picture that has type or a clock in it, obviously. You should also be careful when you flip pictures of people wearing shirts with a pocket on one side, a wristwatch, a wedding ring, a single earring, or another telltale item. And don’t forget to watch out for words on signs in the background and in reflections. If you do need to flip a picture that contains one or more of these giveaway elements, you’ll probably want to use some Photoshop magic to delete or obscure the offending objects. You’ll learn how to do this in Hour 22, “Repairing Color Photos.”

Skewing, Distorting, and Changing Perspective

Skew, according to my trusty American Heritage Dictionary, means “to turn or place at an angle.” So far, that sounds just like rotating. But skew also means “to give a bias to; distort.” Now that’s more accurate for our purposes. When you skew an object in Photoshop, you can do more than just slant it; you can twist, stretch, and distort it as if the object were on a sheet of rubber instead of just depicted on your computer screen. The Skew command (choose Edit, Transform, Skew) enables you to twist the selected object in all possible directions by just clicking and dragging the handles. When you’re happy with the results of your labors, double-click inside the selection or press Enter/Return to apply the transformation.

Skewing is related to the Perspective crop function and can be used to serve the same purpose: restoring warped perspectives. The big difference is that, because it’s used on a selected area instead of the whole canvas, you can straighten individual objects. Figure 10.14 shows a couple of kids checking out a tilting tower at a local children’s museum. Something about the angle of the photo makes the whole thing appear to be slanting. In Figure 10.15, I’ve selected the entire tower with the Polygonal Lasso.

In this snapshot, the kids and their tower seem to be tilting to the right.

Figure 10.15. In this snapshot, the kids and their tower seem to be tilting to the right.

Now I can apply the Skew function (choose Edit, Transform, Skew) to the selected area to straighten it. Figure 10.16 shows this step.

It usually doesn’t take much to straighten a tilting line.

Figure 10.16. It usually doesn’t take much to straighten a tilting line.

Now all I have to do is fill in the “holes” in the rug along the entrance to the tower, and I’m done. That just takes a few swipes with the Clone Stamp; you can see the result in Figure 10.17.

Now the kids aren’t about to topple over.

Figure 10.17. Now the kids aren’t about to topple over.

As you’ve seen so far, all the transform commands operate very similarly, with subtle differences in how each one moves or reshapes the selected object. The Distort command (choose Edit, Transform, Distort) has similarities to both the Scale command and the Skew command, but instead of changing the size of the image, Distort crushes or stretches the image. The big difference between Distort and Skew is that when you use Distort, you can angle the four sides of the selection any way you want—nothing has to remain parallel to anything else. Figure 10.18 shows a cute scooter owned by the New Orleans Police Department and the way it looked after I applied a few distortions to it.

The Distort command can turn this police scooter into a pretzel.

Figure 10.18. The Distort command can turn this police scooter into a pretzel.

 

Select an object in one of your pictures and practice skewing and distorting it. Remember that you must have an active selection to apply either of these commands.

The Perspective command can’t be beat for changing the apparent viewing angle of an image. Its movement is completely intuitive. When you drag a corner handle, the opposite corner mirrors the handle’s movement—if you click an anchor and drag the mouse away from the selection, the opposite corner moves away. When you drag the anchor inward, the opposite corner moves inward as well.

The difference between Perspective and Distortion is that when you apply Distortion, you can do it to only one corner of the selection. Perspective automatically adjusts both corners when you drag one. In Figure 10.19, I’m applying perspective to what I’m pretty sure is a Dominique hen. In this case, I want to make it look as though she’s going straight for me—killer chicken!

Apply the Perspective command to a selection to create false perspective.

Figure 10.19. Apply the Perspective command to a selection to create false perspective.

Using Free Transform

You can use Edit, Free Transform to make any of the changes described. Drag the handles as you press modifier keys to rotate, skew, scale, or distort as much as you want. You can also access the numeric transformations in the Tool Options bar. To distort relative to the center of the bounding box, press Option (Mac) or Alt (Windows) as you drag. To distort freely, press Command (Mac) or Ctrl (Windows) instead. To skew, press Shift-Command (Mac) or Shift+Ctrl (Windows). Press Shift to scale the selection while maintaining its proportions. If you change your mind, press Esc to cancel the transformation.

Warping and Liquifying

Not all transformations have to be useful. The Liquify command, which does exactly that to an image, doesn’t have too many productive uses—but you’ll have a great time playing with it anyway. You can swirl the image, make it bulge or shrink, and generally have fun with it. Pick a photo, or just draw a squiggle on a blank canvas and play with it yourself by choosing Filter, Liquify. Here’s my attempt (see Figure 10.20) at liquifying a vintage fire truck. Of course, you can also use it “seriously” to turn a frown into a smile or to widen a photo subject’s squinting eyes; it’s actually very popular for retouching magazine cover shots of “beautiful people.” Use light pressure, and don’t overdo it.

Dr. Seuss would have loved this.

Figure 10.20. Dr. Seuss would have loved this.

Another semiuseful but extremely entertaining feature that was introduced back in Photoshop CS2 is the Warp command. Select any portion of an image, or activate any layer, and choose Edit, Transform, Warp. Then go to town! You can drag the “handles” around the warp area’s edges to make them bulge or flow, and you can drag the intersections of the interior grid to do the same for the inner portions of the selection or layer (see Figure 10.21).

More methodical than Liquify, Warp still enables you to push pixels around to your heart’s content. Here, we can turn the level New Orleans skyline into a scene from hilly San Francisco.

Figure 10.21. More methodical than Liquify, Warp still enables you to push pixels around to your heart’s content. Here, we can turn the level New Orleans skyline into a scene from hilly San Francisco.

Summary

Transformations are an important function in Photoshop, especially when you’re combining elements from different pictures. You might need to shrink or enlarge an object within the picture or the entire image. Use the Image Size and Canvas Size dialogs to adjust the size of the image or the work area, respectively. Photoshop also enables you to transform selected objects by stretching, distorting, or applying perspective to them. You can do any of these by choosing the appropriate menu command and then dragging the sides or corners of the transformation box.

Q&A

Q.

What exactly does “constrain” mean?

A.

To constrain an action means to restrict its possible outcomes. In the case of the Transform commands, you can constrain rotation to increments of 45° and resizing to maintain the selection’s proportions.

Q.

The selected area looks fuzzy when I’m transforming it. Is that okay?

A.

Sure. Photoshop creates a low-res version of the selection each time you adjust the transformation box; it waits until you apply the transformation to make the high-res version from the image’s original pixels.

Q.

What’s the difference between using Free Transform and using the individual Transform commands?

A.

Nothing, so feel free to use whichever works for you. Personally, I use the Free Transform command for all my scaling and rotation needs.

Workshop

Quiz

1.

Which of the following is not a Transform command?

  1. Scale

  2. Rotate

  3. Modify

  4. Flip

2.

True or false: The Warp and Liquify commands do the same thing, but with a different interface.

3.

Which key do you press while dragging a handle to constrain a transformation?

  1. Shift

  2. Ctrl

  3. Esc

  4. Option/Alt

Answers

1.

C. You can think of the Free Transform command as a way to modify the selection.

2.

False. The Warp tool doesn’t stretch adjacent pixels, meaning that there will be blank spaces next to the selection you’re warping unless it occupies its own layer.

3.

A. If you press Esc, the transformation is canceled.

Exercise

Create a new canvas. Paint a squiggle on it and select the squiggle. Practice scaling, flipping, skewing, distorting, and rotating it. Then choose Edit, Transform, Free Transform or press Command-T/Ctrl+T and use the modifier keys to apply all those kinds of transformations at once.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset