Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Photoshop

This chapter is from the book

This chapter is from the book

Extracting Images

In order to facilitate a smoother workflow, many people isolate individual pieces of a composition to their own layer. It’s possible to place only what you want on an isolated layer. The empty space (often represented by a checkerboard pattern inside Photoshop) is called transparency.

Transparency is the foundation of compositing, and since there are many different situations, there are many approaches to extracting images. Some—such as using an eraser or selecting and deleting—are obvious. Intermediate techniques include layer masking.

Layer Masking

Layer masking is the best way to extract an image. It’s extremely flexible in that it supports multiple levels of transparency. Also, you can continue to touch up your mask throughout the postproduction process. Change your mind, and you can restore any part or even all of the background.

To encapsulate the technology, a grayscale image is attached to the layer, which then masks part of the layer. The term mask is very appropriate because parts of the layer are hidden, not erased. You can add to or subtract from a layer mask simply by painting on the mask. Masks are stored with the document when you save it and can be modified at any point.

Create the layer mask

The best way to learn masks is to create one. This process is fairly complex, but the payoff is big. With practice, layer masking becomes significantly easier. Let’s explore layer masks by building one:

  1. Open Ch04_Layer_Mask.tiff from the chapter folder. This document contains no layers.
  2. You can’t mask the background of an image, because it isn’t a layer. You must convert the background to a layer by double-clicking and naming the layer. You can also Option+double-click (Alt+double- click) to float the layer without assigning a custom name.
  3. It’s best to start a layer mask with a rough selection. Once you have the Background layer unlocked (floating), make a rough selection with the Polygonal Lasso tool.
  4. With the selection active, click the Add Layer Mask button at the bottom of the Layers panel. A black-and-white matte is now added to the layer. Black areas are 100% transparent; white areas are 100% opaque. These layer masks can also be blurred for soft edges or contain gray values for partial transparency.
  5. When you’re ready to clean up the layer mask, select your Paintbrush tool and load the default colors by pressing the D key. White will be used for areas that are opaque (solid), and black will be used for areas that are transparent. You can now toggle between black and white by pressing the X key. (A good mnemonic for this shortcut is Devil’s Xylophone.) For large areas, use a large brush. You can quickly change brush size using the [ and ] keys. You can change brush softness with Shift+[ or Shift+].
  6. Zoom into the document so that you can easily see what you’re working on. Start to paint using a soft-edge brush. Make sure you’re working on the mask. Look for a thin border around the mask thumbnail, which is to the right of the layer thumbnail. If you’re working on a tough area, you may want to switch to a smaller brush or reduce the opacity of your working brush. Less opacity will require more strokes to build your mask. (Think of them as coats of paint.)
  7. You can use the Paintbrush tool to draw straight lines. Click for the starting point, hold down the Shift key, and click for the second point. Photoshop will draw the straight line.

Using the Masks panel

By using the Masks panel, you can quickly create and edit masks more easily. The panel allows you to create and modify both raster- and vector-based masks. Additionally, you can easily adjust mask density and feathering, as well as refine a mask’s selection.

  1. Open the file Ch04_ Bird_Mask.psd from the Chapter 4 folder.
  2. Click the Masks tab to select the Masks panel.
  3. Click the mask thumbnail for the layer named Bird to select the mask.
  4. In the Masks panel, adjust the Density and Feather properties to see their effect.
  5. Return the Density slider to 100% and Feather to 0 px.
  6. Click the eye icon to toggle the masks visibility off. Click again to restore the mask.
  7. Click the Mask Edge button to open the Refine Mask dialog. The controls are identical to the Refine Edge dialog, except here they’re used to modify the layer mask.
  8. Click the Smart Radius check box, and then set the Radius slider to 9 px to remove artifacts.
  9. Set the contrast slider to 25% to make softer edges crisp in the selection.
  10. Set Smooth to a low value like 5 to improve the curved edge, and then change feather to 1.0 px to get a softer edge.
  11. Drag the Shift Edge slider to the left to tighten the mask until the blue fringe is gone. A value of –15% works well for this image.
  12. Click the Decontaminate Colors check box, and set the Output to New Layer with Layer Mask.
  13. Click OK to store the changes to the mask. You can always return to adjust the mask by clicking the Mask Edge button again.

Touching up layer masks

Chances are, the layer mask is pretty good, but like most things, it can always be better. There are a couple of special tricks you can use to make a “perfect” layer mask:

  • Smudging: By using blend modes, the Smudge tool becomes a great way to touch up your layer mask. There are two additional modes available to the Smudge tool when in the Mask mode: Lighten and Darken. You can quickly shift between these modes by using the Shift++ and Shift+– key combo. Use the Darken mode to push the dark edges of the mask in; use the Lighten mode to push the white pixels out. Set the Smudge tool to a low-strength setting, and use short strokes to push the pixels around and fill up your layer mask. As always, the [ and ] keys change brush size, and the spacebar will give you the Hand tool to pan around.

  • Blurring: You can use the Blur tool to control the blurring directly or use a filter. Remember, you’re blurring the layer mask only, not the image. The more blur you use, the more the edges will feather. Experiment with blurring until you get a realistic edge. If you ever go too far, you can always paint detail back in by painting with white.

Once you have the perfect layer mask, you can use it in different ways. If you keep it inside of Photoshop, the transparency is preserved. To use it in applications that don’t recognize PSD layers, you must create an alpha channel (more on that later in the chapter). At any time, you can choose to enable, disable, or permanently apply the layer mask. You access these advanced options by right-clicking the Mask icon.

Saving Selections as Paths

An alternative to layer masks and alpha channels are paths. A path is a vector-based selection, which means that paths don’t allow soft edges. You’ll find paths used most frequently for print applications (where they’re often called clipping paths). However, video folks can use paths, too. Creating a path from an existing mask or channel is easy (as is converting a path back to an active selection).

  1. Open the image Ch04_Refine_Edge.tif from chapter folder.
  2. Switch to the Channels panel, and Cmd+click (Ctrl+click) the alpha channel thumbnail to load it as a selection.
  3. Switch to the Paths panel, which is usually docked with the Layers panel.
  4. Click the Make Work Path from Selection button at the bottom of the panel. You should see a path appear with the title “Work Path.”
  5. Italicized paths or masks are temporary. You need to double-click these temporary paths or masks and assign a name. Double-click the Work Path, and name it “Airplane Path.”

    The path can now be exported to Adobe Illustrator (File > Export > Paths to Illustrator) where it can be cleaned up or sized. This can be useful for creating a silhouette image. Vector graphics have the advantage of unlimited scaling, with no quality loss.

You may need to go the other direction when using stock images. Because paths are vector-based, they take up much less space in terms of file size. These savings make it much more likely to find clipping paths with stock photos collections. You can Cmd+click (Ctrl+click) the path’s icon and then switch over to the Channels panel. Click the Save Selection as Channel icon, and you’re set.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020