Chapter 18

Fitting Graphics and Setting Paths

In This Chapter

ᮣ Displaying just the desired part of graphics

ᮣ Fitting graphics into frames and vice versa

ᮣ Using graphics in odd shapes

ᮣ Using clipping paths

After you import a graphic into an InDesign document, you can modify either the graphic or the frame that contains it. The most common actions you’ll take are cropping, repositioning, and resizing. And if you want to get really fancy, you might work with clipping paths to create “masks”

around picture portions or even cut the graphic into pieces.

Transformations such as resizing, flipping, rotating, and skewing that you’re likely to apply to graphics use the same tools for graphics as for any InDesign objects. So I cover all these transformations in one place, in Chapter 8.

In almost every case, you select graphics with the Direct Selection tool to work with the graphic itself, rather than to the frame. If you use the Selection tool, the work you do will apply to the frame, as Chapter 11 explains. Cropping Graphics

Remember, when you import a graphic using the Place command (File➪Place

[Ô+D or Ctrl+D]) or by dragging a graphics file into a document window (see Chapter 17), the graphic is contained in a graphics frame — either the frame that was selected when you placed the graphic or the frame that was automatically created if a frame wasn’t selected. The upper-left corner of an imported graphic is automatically placed in the upper-left corner of its frame. 294 Part V: Graphics Essentials

Cropping is a fancy term for deciding what part of the picture to show by altering the dimensions of the frame holding the graphic. The easiest way to crop a graphic is to resize the frame that contains it using the Selection or Position tool. To discover how to resize the frame, go to Chapter 8. Note that resizing the frame does not resize the graphic.

The other way to crop a graphic is to leave its frame alone and instead move the graphic within the frame. (The advantage of moving the image within the frame is that you don’t have to move the frame from its desired position in the layout.) To do so, you have two options:

ߜ

Click on a graphic with the Direct Selection tool and then drag the graphic within its frame to reveal and conceal different parts of the graphic. For example, you can crop the top and left edges of a graphic by dragging the graphic above and to the left of its original position (in the upper-left corner of the frame).

ߜ

Use the X+ and Y+ fields in the Control panel and Transform panel, which let you determine precisely how much to move the graphic horizontally and vertically within its frame by entering specific values. Positive values move the graphic to the right or down relative to the frame, while negative values move it to the left or up relative to the frame. This method is more precise than using the mouse.

If you want to mask out (hide) portions of an imported graphic, you have the option of using an irregular shape as the frame, a graphic’s built-in clipping path (if it has one), or a clipping path you generated in InDesign, as covered in the last section of this chapter.

Figuring out the Fitting Commands

If you’ve placed a graphic in a frame that’s either larger or smaller than the graphic, you can use the Fitting options (available by choosing Object➪Fitting or by using the appropriate iconic buttons in the Control panel) to scale the graphic to fit the frame proportionately or disproportionately or to scale the frame to fit the graphic. Another option lets you center the graphic in the frame. These options are very handy, and a lot easier than trying to resize a graphic or frame to fit using the mouse or the Control panel. Keep in mind that the fitting commands for graphics are available only if you’ve used the Selection or Position tool to select a graphic’s frame. Here’s a description of each of the six options:

Chapter 18: Fitting Graphics and Setting Paths

295

ߜ

Fit Content to Frame: To scale a graphic to fill the selected frame, choose Object➪Fitting➪Fit Content to Frame (Option+Ô+E or

Ctrl+Alt+E). If the frame is larger than the graphic, the graphic is enlarged; if the frame is smaller, the graphic is reduced. If the graphic and the frame have different proportions, the graphic’s proportions are changed so that the image completely fills the frame — this Fit Content to Frame option can distort the graphic’s appearance.

ߜ

Fit Frame to Content: To resize a frame so that it wraps snugly around a graphic, choose Fit Frame to Content (Option+Ô+C or Ctrl+Alt+C). The frame is enlarged or reduced depending on the size of the graphic, and the frame’s proportions are changed to match the proportions of the graphic.

ߜ

Center Content: To center a graphic in its frame, choose Center Content (Shift+Ô+E or Ctrl+Shift+E). Neither the frame nor the graphic is scaled when you center a graphic.

ߜ

Fit Content Proportionally: To scale a graphic to fit in the selected frame while maintaining the graphic’s current proportions, choose Object➪Fitting➪Fit Content Proportionally (Option+Shift+Ô+E or Ctrl+Alt+Shift+E). If the frame is larger than the graphic, the graphic is enlarged; if the frame is smaller, the graphic is reduced. If the graphic and the frame have different proportions, a portion of the frame background shows above and below or to the left and right of the graphic. If you want, you can drag frame edges to make the frame shorter or narrower and eliminate any portions of the background that are visible. ߜ

Fill Frame Proportionally: To resize a graphic so that it fills its frame on all sides, choose Object➪Fitting➪Fill Frame Proportionally (Option+Shift+Ô+C or Ctrl+Alt+Shift+C). Note that this option may crop out part of the image, so no gap appears between any part of the image and the frame. (By contrast, the Fit Frame to Content Proportionally option can result in extra space at the bottom and/or right sides of a graphic so that the entire graphic is visible.)

ߜ

Frame Fitting Options: To control the default fitting for newly placed graphics, use the Frame Fitting Options dialog box, shown in Figure 18-1. Here, you can set the amount of crop, choose the control point for the imported graphic (see Chapter 1), and automatically apply your choice of the Fit Content to Frame, Fit Content Proportionally, and Fill Frame Proportionally options.

For frames with strokes, the Fitting options align the outer edge of a graphic with the center of the stroke. A stroke obscures a strip along the graphic’s edge that’s half the width of the stroke. The wider the stroke, the more of the graphic that gets covered up.

296 Part V: Graphics Essentials

Figure 18-1:

The Frame

Fitting

Options

dialog box

lets you set

the default

behavior

for newly

imported

graphics.

You can also use the frame-fitting iconic buttons in the Control panel, shown in Figure 18-2. But note that these buttons may not display in your Control panel; by default, InDesign shows them only if your monitor is set to a resolution whose width is 1,280 or more pixels. You can make room for them at smaller resolutions by customizing the Control panel display: Choose Customize from the panel’s flyout menu and then deselect some of the Object controls to make room.

Fit Content Proportionally

Figure 18-2:

Fit Content to Frame

Center Content

The framefitting iconic

buttons in a

customized

Control

Fill Content Proportionally

panel.

Fit Frame to Content

Working with Graphics

in Irregular Shapes

Although most graphics you use will be placed in rectangular frames, InDesign does give you other choices:

ߜ

You can select any type of frame — oval or polygonal, not just rectangular — to place or copy your graphic into.

ߜ

You can draw your own shape using the Pencil or Pen tool and then place or copy your graphic into it. When you create the free-form shape, Chapter 18: Fitting Graphics and Setting Paths

297

make sure that the default color for the Pen tool is set to None so that the shape you create is transparent. Otherwise, the colored area in the shape will obscure the graphic behind it.

The Pen tool lets you create one shape at a time. The Compound Paths command lets you combine multiple shapes to create more complex objects. For example, you can place a small circle on top of a larger circle and then use the Compound Paths command to create a doughnutshaped object. (This expert feature isn’t covered in this book.)

If you copy the graphic into a frame or shape, you must use the Paste Into command (Edit➪Paste Into [Option+Ô+V or Ctrl+Alt+V]) to place the copied graphic inside the selected shape, rather than on top of it. ߜ

You can use a clipping path that was defined in the graphic itself when it was created or a clipping path that was created in InDesign.

So what is a clipping path, anyway? A clipping path is used to mask certain parts of a graphic and reveal other parts; it’s basically an invisible outline placed in the graphic that InDesign can then work with. For example, if you want to create a silhouette around a single person in a crowd, open the file in an image-editing program, such as Photoshop, and then create and save a clipping path that isolates the shape of the person. (You can also erase everything except the person you want to silhouette; this approach can be time-consuming, and if you want to reveal other parts of the graphic later, you’re out of luck.) TIFF, Photoshop EPS, and Photoshop-native (.psd) files can have embedded clipping paths.

Regardless of the method you use to clip an imported graphic, you can modify a clipping path by moving, adding, deleting, and changing the direction of anchor points and by moving direction lines. You can convert a clipping path — whether imported or created in InDesign —

to a frame by choosing Convert Clipping Path to Frame for a selected object using the contextual menu (Control+click or right-click the object). See the Photoshop For Dummies series (Wiley Publishing) for more on creating clipping paths in Photoshop.

Using a graphic’s own clipping path

In an ideal world, any graphics that you want to have fit in an irregular shape will come with their own clipping paths. But many don’t, so you need to create your own in InDesign, as described in the next section. But for those graphics that do have their own clipping paths, you would first be sure to import the clipping path when you place the graphic and then use InDesign’s Text Wrap panel to access that clipping path.

298 Part V: Graphics Essentials

The steps are easy:

1. Be sure to select the Show Import Options check box in the Place dialog box (FilePlace [Ô+D or Ctrl+D]) when you import the graphic and select the Apply Photoshop Clipping Path option in the Image Import Options dialog box.

2. Open the Text Wrap panel (WindowText Wrap [Option+Ô+W or Ctrl+Alt+W]).

3. Select the graphic.

4. Click the Wrap Around Object Shape iconic button (the third one from the left) at the top of the Text Wrap panel.

5. If you want, adjust the space between the surrounding text and the obstructing shape by typing values in the Top Offset field.

6. Now select the clipping source from the Type pop-up menu in the Contour Options section of the Text Wrap panel.

Choose from two relevant options:

• Alpha Channel uses the image’s alpha channel, if any, to create a wrapping boundary. (An alpha channel is another type of clipping path and is also created in the source program such as Photoshop.)

• Photoshop Path uses the image’s clipping path, if any, to create a wrapping boundary. Use the Path pop-up menu to select which

path to use, if your image has more than one embedded clipping path.

See Chapter 11 for the basics of text wraps.

Creating a clipping path in InDesign

If you import a graphic that doesn’t have a clipping path, you have two sets of options for creating one.

The easiest is to use the Text Wrap panel as described in the previous section but to instead choose one of the following options from the Type pop-up menu:

ߜ

Detect Edges tries to determine the graphic’s outside boundary by ignoring white space. You’d use this option for bitmapped images that have a transparent or white background.

ߜ

Same as Clipping uses the clipping path for the graphic created in InDesign. You’d use this approach when the desired clipping path can’t be created through the Detect Edges option. (I cover this method of clipping-path creation shortly.)

Chapter 18: Fitting Graphics and Setting Paths

299

You can further modify the clipping path by selecting the graphic with the Direct Selection tool. The text-wrap boundary appears as a blue line. You can make the boundary easier to select by setting offsets in the Text Wrap pane, which moves the boundary away from the frame edge.

A slightly more difficult way to create a clipping path — but one that gives you more control — is to use the Clipping Path command to generate one automatically:

1. Select the graphic to which you want to add a clipping path.

Use the Direct Selection tool so that you can see the clipping path within the frame as you work.

2.

Choose

ObjectClipping PathOptions (Option+Shift+Ô+K or Ctrl+Alt+Shift+K).

The Clipping Path dialog box appears, as shown in Figure 18-3.

3. To have InDesign detect the likely boundary of the image, as opposed to a white or other light background, choose Detect Edges from the Type pop-up menu.

You can use the other options to select Alpha Channel or Photoshop Path as the clipping path for graphics that have one or more of these. (InDesign can only use one alpha channel or Photoshop path as the clipping path, so use the Path pop-up menu to choose the one you want.)

4. Type a value in the Threshold field or click and drag the field’s slider to specify the value below which pixels will be placed outside the clip- ping path shape (that is, pixels that will become transparent).

Pixels darker than the Threshold value remain visible and thus are inside the clipping path shape. The lowest possible Threshold value (0) makes only white pixels transparent. As the value gets higher, less of the graphic remains visible. The lightest areas are removed first, then midtones, and so on. (Select the Preview option to see the results of your changes without closing the dialog box.)

Figure 18-3:

The Clipping

Path dialog

box and its

effect on a

graphic.

300 Part V: Graphics Essentials

5. Type a value in the Tolerance field.

This value determines how closely InDesign looks at variations in adjacent pixels when building a clipping path. Higher values produce a simpler, smoother path than lower values. Lower values create a more complicated, more exact path with more anchor points.

6. If you want to enlarge or reduce the size of the clipping path pro- duced by the Threshold and Tolerance values, type a value in the Inset Frame field.

Negative values enlarge the path; positive values shrink it. (The Inset Frame value is also applied to the path’s bounding box.)

7. Select the Invert option to switch the transparent and visible areas of the clipping path produced by the Threshold and Tolerance values.

8. If you want to include light areas in the perimeter shape InDesign generates based on the Threshold and Tolerance values, select the Include Inside Edges option.

For example, if you have a graphic of a doughnut and you want to make the hole transparent (as well as the area around the outside of the doughnut), click Include Inside Edges. If you don’t click Include Inside Edges, InDesign builds a single shape (in the case of a doughnut, just the outside circle). The portion of the graphic in the shape remains visible; the rest of the graphic becomes transparent.

9. Select the Restrict to Frame option if you want InDesign to gener- ate a clipping path from just the portion of the graphic visible in the graphic frame, as opposed to the entire graphic (such as if you cropped the graphic).

10. Select the Use High Resolution Image option if you want InDesign to use the high-resolution information in the original file instead of using the low-resolution proxy image.

Even though using the high-resolution image takes longer, the resulting clipping path is more precise than it would be if you didn’t check Use High Resolution Image.

11. When you’ve finished specifying clipping path settings, click OK to close the dialog box and apply the settings to the selected graphic.

If you use the Clipping Path command to generate a clipping path for a graphic that has a built-in clipping path, the one that InDesign generates replaces the built-in path.

Chapter 18: Fitting Graphics and Setting Paths

301

Figure 18-4 shows a graphic before and after a clipping path was applied to it using the Clipping Path command. At left is a graphic of coastal France with a graphic of a glider superimposed. At right is the same set of graphics, but with a clipping path applied to the glider so that the outside area is masked out, making it transparent.

Figure 18-4:

A superimposed

image

before (left)

and after

applying

a clipping

path (right).

The Clipping Path command works very well for images that have a white or light background but no clipping path. It’s less useful for graphics with backgrounds that contain a broad range of intermingling values. You can remove a clipping path by choosing None as the Type in the Clipping Path dialog box. You can also select a different path — Detect Edges, Alpha Channel, Photoshop Path, or User-Modified Path — than was selected previously if you decide to change the current clipping path.

InDesign lets you convert a clipping path into a frame so that you get the exact shape as your clipping path to use as a container or silhouette in your layout. Select the clipping path with the Direct Selection tool and choose Object➪Clipping Path➪Convert Clipping Path to Frame. It’s as easy as that!

302 Part V: Graphics Essentials