November 20 2008 • 12:34 PM

Utilizing Alpha Channels When Placing Extracted Images

Let’s say you’d like to place a detailed bitmap image over a colorful background that you created in InDesign. The image shown here is a perfect example.

In order to achieve this effect, you must drop the white area surrounding the flower. Rather than applying an InDesign clipping path, which rarely looks natural enough to actually use in a layout, you must extract the image from its background in Photoshop. There are several ways you can go about doing this, but only one way that will give you the results you want without having to spend a lot of time in another application.

You could do it the “old school” way by drawing a clipping path around the flower in Photoshop and saving it as an EPS; however, to do so would be very tedious and time consuming, even for someone who is an expert at creating bezier paths with the Pen tool. And even though the EPS path would appear much more precise than the InDesign clipping path, the hard edges would still appear just as unnatural.

A better option, (but still not the best), would be to use the Extract filter and place a transparent PSD in InDesign. The first problem with the Extract filter is that it’s no longer native to Photoshop CS4. I know. It’s hard to believe, but if you don’t believe me, go check under the Filter menu. It’s not there! Photoshop is notorious for keeping outdated legacy features around and never removing them, but with CS4 they’ve started to. Why they’ve decided to remove something as useful as the Extract filter and keep other far less useful filters around (Blur More?) is beyond me. But according to John Nack’s blog, they’re planning to incorporate some new extract features into future versions of PS without the use of a filter. For now, the good news is that Extract is still available as an optional filter. It’s in the Goodies folder on your CS4 install disc, or you can download it here.

The other problem with the Extract filter is that working with it is just as tedious and sometimes even more time consuming than drawing a path with Pen tool. The benefit to using it is that you can get nice, natural soft edges. But to trace a detailed image like this one with the Extract filter’s Highlight tool would take forever and a day–even with the Smart Highlight feature enabled. There must be an easier way…Background Eraser? No, don’t even bother. Now there’s a legacy feature that should have been removed.

The Extract filter is definitely still the tool to use when you need to remove an image from a detailed background. But to remove an image such as this flower from a white, or solid color background and place it in InDesign, you’re better off making a selection and saving it as an alpha channel.

All you need to do is click once in the background area with the Magic Wand tool set at a very low Tolerance setting (7 in this instance). The low Tolerance setting allows you to capture more detail around the edges of the flower. Then choose Select > Similar. You now have the entire background selected, including all of those tiny white areas between the leaves of the flower. Now inverse the selection by pressing Cmd/Ctrl+Shift+I. Wasn’t that easy? In just a matter of seconds you bypassed all the extra work involved with using the Extract filter.

The next step is to make sure the selection edge is not too hard or soft. You want to make sure that your image will appear natural when you place it in InDesign. Click the Refine Edge button in the Control panel to open up the Refine Edge dialog box. In order to see the selection edges more accurately, you should preview them over black, as shown here. For a soft, detailed image like this one, I would recommend increasing the Radius value and setting Feather to zero.

The last step is to save the selection as an alpha channel. Choose Select > Save Selection. In the Save Selection dialog box that appears, enter a name for the alpha channel and click OK. Finally, save the image as a PSD, making sure that Alpha Channels is checked in the Save As dialog box.

Now return to InDesign and choose File > Place. In the Place dialog box that appears, turn on Show Import Options. Browse to the image on your system and click OK. In the Image Import Options dialog box that appears, click the Image tab. Choose the alpha channel from the Alpha Channel drop down list and click OK. Now place the image over the colored background. The final image cropped and placed in the upper right corner of the InDesign layout.

Alpha channels are always created from selections. Therefore, if you practice making accurate selections in Photoshop quickly and easily, you can store that information as an alpha channel in a PSD and make good use of it in your InDesign layouts.

15 Responses discussing this post. Add yours below.

  1. November 20th, 2008 • 3:57 pm • Link

    Ted,

    This might show some of my weakness in Photoshop, but why bother with the alpha channel? You can just invert the selection after you refine the edge and hit delete to remove the background (or use a layer mask), and just save the transparent psd.

  2. November 20th, 2008 • 6:52 pm • Link

    Deleting the background entirely is certainly an option, but I’m a big fan of working non-destructively. I’d rather keep the background in place and use the alpha channel, just in case I need to refine my selection and edit or replace the channel later.

    Depending on how well refined your selection is, you may wind up deleting small portions of your image that weren’t selected well enough, or get stuck with a thin area of white that’s still visible around the outer edges of the extraction. Layer > Matting> Defringe can help clean up some of that, but sometimes it’s not enough.

    If you delete the background, you’re not giving yourself the chance to improve the selection and save another alpha channel, should you need to. Work smart, not hard. That’s what I always say.

  3. November 20th, 2008 • 7:39 pm • Link

    Would a Layer Mask work just as well on the PSD, they are editable.

  4. Gfx-Dzine
    November 21st, 2008 • 12:45 am • Link

    Although I agree not the option to go for for this pictures, one of the new features in Ps CS4 is that pentool masks can now be softenend (feathered) too. Select the vector mask and increase the feather value in the Masks panel. To hide the path so you can see the effect better press Ctrl + H (again to show again).

    The location of the mentioned optional Plugin pack download location is for mac. For windows goto http://www.adobe.com/support/downloads/product.jsp?product=39&platform=Windows

    The Magic Wand only selects the white background parts inside the flower when the ‘Contiguous’ option in is turned off.
    As an alternative to the Magic Wand the Select/Color Range could be used. A more interactive process to make a selection.
    For refining the Refine Edge option is ofcourse great.

    Thanks for the post, cheers,
    Mike.

  5. November 21st, 2008 • 3:15 am • Link

    A layer mask would certainly be a good option here. You can also use the refine-command on those.

  6. Jerome Gantner
    November 21st, 2008 • 4:21 am • Link

    With that image one of the fastest ways to get a nice outlined images appears to be the calculations command. Use it to create an alpha channel that is “grey” multiplied into “grey”, or try some other combinations. A little refining and you should be able to come up with a good greyscale mask which can be turned into a layer mask for the image.

  7. November 21st, 2008 • 5:51 am • Link

    An alpha channel is a mask that is applied to the entire image (all layers) rather than a single layer. You can only apply one layer mask to a single layer, but you can create multiple alpha channels. For example, I could create another alpha channel based on a selection of the flower without the stem.

    You can create as many alpha channels as you want, store them in the image, and then apply them in InDesign. Layer masks are non-destructive and I use them all the time, but you can’t control them in InDesign like you can with alpha channels.

    I think creating a selection and using Refine Edge is much easier than working with Calculations. The latter is a legacy feature which is far less intuitive.

  8. Toby Fairchild
    November 21st, 2008 • 12:59 pm • Link

    I agree with Ted. In addition to what Ted said regarding alpha channels being applicable to the whole image rather than just a layer as with layer masks, you can use a layer mask (or selection) to then create an alpha channel to be stored with the image.

  9. Eugene
    November 21st, 2008 • 1:24 pm • Link

    I’m not entirely convinced of this. Although it’s an interesting approach to removing a background. The reason I am not convinced is that some RIPs I’ve dealt with don’t handle Alpha Channels very well, or not at all.

  10. November 21st, 2008 • 1:44 pm • Link

    @Eugene: “The reason I am not convinced is that some RIPs I’ve dealt with don’t handle Alpha Channels very well, or not at all.” If one prints directly from ID to the RIP, that could be an issue — but surely, if one creates a PDF from ID, either flattened or with live transparency, then all those alpha channels should become harmless in the PDF, and hence not a danger to ill-behaving RIPs? Can anyone confirm or deny this theory?

  11. Eugene
    November 21st, 2008 • 3:42 pm • Link

    Ah, Klaus you’ve triggered a memory. Indeed, you are correct. It was at the time of sending EPS from Quark through a RIP. Argh, obviously blocked out that memory :) Ok, I have bad memories of Alpha Channels through RIPs.

    Ok, I’m convinced, Ted this is a fantastic post and I’m convinced. In the back of my mind I always kept thinking, “NO TO ALPHA CHANNELS” but now, as Klaus points out, in PDF they pose no “threat”".

    Great stuff!

  12. Lee
    November 24th, 2008 • 9:17 am • Link

    Let’s just get one thing straight: you can’t really use alpha channels in InDesign, can you?

    I mean it will make a solid path based on the 50% threshold of the channel, but you can’t actually use the transparency?

    When I moved over to InDesign from Quark, alpha channels was one of the things I was looking forward to using. But after trying many times, I could never get them to work. The only alpha channel support seems to be just a cheap way of getting a clipping path.

  13. November 25th, 2008 • 7:45 am • Link

    @Lee – Yes, you really can use transparency through alpha channels in InDesign. I’ve never had a problem. It is not a solid path.

  14. David Blatner
    November 25th, 2008 • 12:27 pm • Link

    Just to back up Ted here: Absolutely! Using alpha transparency in imported images is one of the best reasons to use InDesign.

    You can also sort of make your own transparency masks in InDesign with any object.

  15. Alan G
    December 31st, 2008 • 2:22 pm • Link

    I mostly avoid the Magic Wand because of its “all or nothing” approach to selecting pixels. In this case Select>Color Range would work very well (it allows for partial selections, which preserves anti-aliasing in the image), and the selection dialog is interactive so you can see what you’re getting.

    But for me the fast approach to a complex image like this is usually to duplicate the highest-contrast channel in the channels palette, reverse it, and then make a quick Levels adjustment. Problems with jpeg compression or variations of background shade or texture become very easy to see and control, and the alpha channel is easy to fine tune with the dodge and burn tools. (Set Dodge to “Highlights” and Burn to “Shadows” with a 25-50% exposure setting.)

    Katrin Eisman’s excellent and thorough “Photoshop Masking and Compositing” is a terrific resource for this sort of thing.

    Another point worth making is that InDesign handles an alpha channel in a PSD much more accurately than the same channel in a TIFF. I’ve never bothered to find out why; I just always use PSD for placed images.

Subscribe to the Discussion

Get the ongoing discussion surrounding "Utilizing Alpha Channels When Placing Extracted Images" delivered to you. Click here to subscribe via RSS.

Leave a Reply

You can use limited HTML tags, such as <em></em> for emphasis/italics and <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

InDesignSecrets reserves the right to edit and/or remove posts and comments.