ASK MORDY: Adding Keylines to Placed Images

This question comes in from Sara Ford:

I am having a problem with Illustrator that seems pretty basic, but I just can’t figure it out. I placed a picture into my document, and I just want to add a stroke around it. But when I do, the line doesn’t show up? What am I doing wrong?

In reality, I get this question a lot. The problem is that unlike InDesign, which has a concept of frames (and the frames have Fill and Stroke attributes), Illustrator is frameless (others may use the term spineless, but we won't go there now). The "problem" that exists is that a placed image in Illustrator isn't an object that can have Fills or Strokes. It's not a vector shape and therefore lacks those attributes.

Most people take the "easy" route and simply use the Rectangle tool to draw a shape around the image. But even that is too much work. Let's explore some ways to "solve" the "problem" at hand...

First, it's important to understand that a placed image is not a vector object, and hence, can't have a fill or stroke attribute. So we'll need to create another vector object to contain our stroke attribute. But I don't want to create that object on my own. I want Illustrator to create it for me. There are basically two ways to accomplish this: have Illustrator automatically create a mask for the image; or use an effect to convert the bounds of the object into a vector object. Both have pros and cons and work better depending on the task at hand. Ready to discuss? Let's go!

USING A MASK

This technique requires the use of Illustrator CS3 and will work only when your keyline will be rectangular in shape.

1. Choose File > Place and choose an image to place into your Illustrator document. You can either Link or Embed the image. Once you've chosen the image, click the Place button.

2. The image is selected (or if your image already exists in your document, select it), so if you look in your Control panel at the top of the screen, you'll see a button labeled "MASK". Click on it. This creates a mask at the exact bounds of the image.

3. Press the "D" key for Default. This will give the mask a black 1 pt stroke attribute. Feel free to adjust the stroke per your design needs (who uses a 1 pt stroke anyway?).

NOTE: An additional benefit to this method of using a mask is that you now have the elements in place to simulate a "frame and image" paradigm like InDesign. Once you've created your mask, you can decide to "crop" your image by double clicking anywhere on the photo. This will put you into Isolation Mode. Now click on the frame edge and resize at will. When you're done, double click outside the image to exit isolation mode and continue working. This method works wonderfully when you're using the Selection tool (black arrow) and have the Bounding Box option turned on (in the View menu).

USING AN EFFECT

At first, it may seem that applying a keyline with the use of an Effect is a tedious process. But we all know that once we've applied an effect, we can store it as a Graphic Style, at which point applying our keyline will become a single click. Go ahead, ask me why Adobe doesn't ship Illustrator with such an effect as a default setting in the NDPs (New Document Profiles). Go ahead, ask me why Adobe doesn't allow us to assign keyboard shortcuts to styles like InDesign does. I don't have answers to either of those questions (sorry). But let's get on with the styles, shall we? There are two separate effects that we can use, and each provides a different benefit.

1. Choose File > Place and choose an image to place into your Illustrator document. You can either Link or Embed the image. Once you've chosen the image, click the Place button.

2. The image is selected (or if your image already exists in your document, select it). Open your Appearance panel and from the Appearance panel flyout menu, choose Add New Stroke. We can't see the stroke yet, because all we have is an image. But we'll change that in short order.

3. With the Stroke highlighted in the Appearance panel, choose Effect > Convert to Shape > Rectangle. Check the Preview button, Select the Relative option, and set both the Extra Width and Extra Height to zero (0). (Careful not to press Tab after you enter the second value or it will switch back to Absolute.) Click OK to apply the effect. If you'd like, style the stroke attribute to match your design preference (again, who uses a 1 pt stroke?).

4. To make this easier to apply in the future, with the object still selected, open the Graphic Styles panel and click the New Graphic Style button at the bottom of the panel. Give the style an appropriate name. It would be a good idea to add this style to your NDPs so that it will be readily available in all new files that you create.

This technique obviously only works if your keyline is rectangular in shape. But what if your image had transparent areas in it? What if you silhouetted the photo in Photoshop (keeping the background transparent), and placed the PSD into Illustrator? Is there a way to apply a stroke to the boundary of the ART instead of to the boundary of the entire image? The technique I'm about to show you will do just that, and will also do the job for rectangles as well.

1. Choose File > Place and choose an image to place into your Illustrator document. You can either Link or Embed the image. Once you've chosen the image, click the Place button.

2. The image is selected (or if your image already exists in your document, select it). Open your Appearance panel and from the Appearance panel flyout menu, choose Add New Stroke. We can't see the stroke yet, because all we have is an image. But we'll change that in short order.

3. With the Stroke highlighted in the Appearance panel, choose Effect > Path > Outline Object. If you'd like, style the stroke attribute to match your design preference (again, who uses a 1 pt stroke?).

4. To make this easier to apply in the future, with the object still selected, open the Graphic Styles panel and click the New Graphic Style button at the bottom of the panel. Give the style an appropriate name. It would be a good idea to add this style to your NDPs so that it will be readily available in all new files that you create.

It just so happens that if you're applying this last effect to an image with no transparency, only the outside portion of the stroke will become visible. Meaning that if you're stroke weight was set to 1 pt, only .5 pt of the stroke will be visible. To get the full 1 pt stroke, select the Stroke attribute in the Appearance panel and choose Effect > Path > Offset path and choose an offset amount that's half the weight of the stroke. In our example, you would use a .5 pt offset value.

For even more fun, you can combine BOTH of these effects (simply by adding two strokes to your image), hence giving your transparent images a stroke around the bounds of the artwork as well as a keyline around the bounds of the entire image.

Facebook Comment

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks