Expression Blend and Design

The team blog of the Expression Blend and Design products.

Removing backgrounds from photos

Removing backgrounds from photos

Rate This
  • Comments 13

Expression Design gives you all the tools you need to easily remove backgrounds from photos. In this tutorial we'll remove the background from a dog image and place the results over a different background.

This tutorial starts with a photo Shango. To follow along using the photos in this tutorial, right click on the photos below and save them to your hard drive.

Shango

Once we remove the background, we'll place Shango over the following image of a tree house.

 

To import the images into Design and prepare for photo manipulation, follow these steps:

1. Launch Design and choose File > New from the menu bar.

2. In the New Document dialog box, choose Custom from the Presets drop down list and set the Width and Height fields to 800 pixels. Click OK to create the new document.

3. In the Layers panel, double click on the default layer name (Layer 1) and type Tree House to rename the layer.

4. To insert the tree house image on the newly named layer, choose File > Import from the menu bar, navigate to the tree house image and click Open to insert the image.

The method we'll use to remove the background from the dog image requires that the photo of Shango be on a separate layer. I'll explain the reasons for this as we progress. Follow these steps to create a new layer for Shango.

5. Click on the New Layer button in the lower right corner of the Layer panel.

6. Double click on the name Layer 2 and type Shango to rename the layer.

7. Choose File > Import, navigate to Shango's photo and click Open to place Shango on the new layer.

8. The tree house image will be a distraction as we work with the Shango layer so click on the eye icon on the tree house layer to hide the tree house image.

To remove the background we need the Pen tool, the 4th tool from the top in the Toolbox. Below is the result we're after, followed by the steps taken to reach this result:

9. On the Properties pane, click on the Fill tab and choose a fill color; I chose red but any color will do. (Remove any stroke attribute if one is present; we don't want a stroke.)


10. Choose the Pen tool from the Toolbox and beginning slightly to the left of the image, at Shango's right leg, begin creating a path staying as close to the edges of the dog as possible. You can correct any mistakes later so continue on if you make a mistake.

11. When you reach the right edge of the photo, click once to go slightly beyond the right edge of the photo and then continue the path up the right side, the top and down the left side of the image, ending the path by clicking on the first node you created. (The Pen cursor will display a small circle when you are about to close a path.)

12. Make any adjustments you want to your path with the Direct Select tool. With this tool, click on a node and move it closer to Shango if you find an area where the background shows, or away from him if you accidently cut off the bottom of his ear.

13. To soften the edges of the selection, click the fx button on the Effects panel and choose Gaussian Blur.

 

14. Move the Radius slider to the right until you reach the desired softness; I chose 0.5.

15. Expand the Advanced Properties section of the Appearance panel and set the Blending Mode to Eraser. (Click the downward pointing arrow just above the Effects panel to open the Advanced Properties section.)

 

The Eraser blending mode causes strokes and filled objects to erase through all objects below it to the bottom of the layer. This is why we put Shango on a separate layer. Had we put Shango on the tree house layer, the shape we created would have erased through the tree house photo as well.

16. To ensure that the eraser object  and the image of Shango are not disturbed, select both objects, right click on the selected objects and choose Group from the resulting context menu.

Now that Shango's background has been successfully removed, it's time to unhide the tree house. Click the Eye icon on the Tree House layer to reveal the tree house image. Make any size adjustments you'd like to either the Shango image, the tree house or both. Here's the end result:


 

Leave a Comment
  • Please add 1 and 4 and type the answer here:
  • Post
  • PingBack from http://blogs.msdn.com/expression/pages/samples-and-tutorials-gallery-expression-design.aspx

  • Two new tutorials for Expression Design have been added to the Samples and Tutorials Gallery - Expression

  • Hola a todos Asi es para nuestros amigos designers contamos con 2 nuevos tutoriales de Expression Design

  • Hola a todos Asi es para nuestros amigos designers contamos con 2 nuevos tutoriales de Expression Design

  • Fantastic ... I've been trying to work out how to do this for ages!

    Thank you!

  • I'm sure I'm not alone on this, but for those of us who were using Image Composer that came with FrontPage back in the day, and then Photo Draw afterward, it was very frustrating to not have this particular instruction included in the training video that came with the product. I knew there HAD to be a way to cut a piece of a flat object out and use it in another layer, but if you go to help in ED there is zero when you search for the word "cut".

    If anyone on the ED development team is reading this I can assure you that if you made the terminology available for users who used your earlier products, you'd have a lot more fans of ED out there because it really is a great product. I almost gave up on it before I found this article... so thanks!!!

  • Sorry but this is not cool.  I love many of the features introduced by expression design; especially the sub-selection slice tool and gradients.  However, coming from design background with thousands of hours staring into adobe photoshop, I know that creating clipping path with the pen tool is not the way to go!  We need more advanced support for raster images--image masking for example.  Hopefully the dev team is already working on these issues...  I guess that means that I'll have to purchase another expression studio...

  • If this is the only way to do this this is piss poor for expression web. I should be able to select items by color too. As I look at trying to remove the background on an object that has jagged edges, which is clearly seperated by a white background.

    It's the little things that make products excellent not just one or two new cool features. To compare products this is a basic feature in Photoshop....

    If you are going to take customers away from competitors you have to expect your product to do what theirs does plus more...

  • Cool, I'm definitley gonna give this a try :). It will make things so much easier.

  • How do I cut out the background, for eksample on a matchstick man, wich has white background, I just want the black matchstick man, not the white background, plz answer, im cracking up!! :)

  • The Magic Wand in Photoshop (and even in Paint .NET too) would have made this quite easier! Hope to see these features in the next release.

    One thing I like about Expression Design: it's damn easy to learn.

  • Thanks for the tutorial!  But yikes, even  back in Photoshop 6, which is on my old desktop, there was a handy button under IMAGE to EXTRACT. It has a smart trace so the line you draw goes mostly to the edge of the figure you want to cut out.  I was given Expression Design for my laptop, I hope I don't find it so disappointing in other ways so I need to buy Photoshop for it.  Cutting out figures is pretty basic and needed all the time, it's amazing they don't have an official, easy way to do it, and have it easy to find in the help menu.

  • Great post!

    Thanks for sharing this.

    Thanks,

    pheditor.com.au/features

Page 1 of 1 (13 items)