Các công cụ Selection

There are several tools you can use to create pixel selections:

  • Smart Selection Brush Tool (see Painting pixel selections)
  • Flood Selection Tool (see Flooding pixel selections)
  • Rectangular Marquee Tool (see Marquee pixel selections)
  • Elliptical Marquee Tool
  • Column Marquee Tool
  • Row Marquee Tool
  • Polygon Marquee Tool (see Drawing pixel selections)

When working with selections, you may have access to the following Modes which affect how your selection develops:  

  • New — bỏ vùng chọn đang có để tạo một vùng chọn mới.
  • Add — gộp thêm vùng chọn vào vùng chọn hiện tại.
  • Subtract — trừ vùng chọn hiện tại từ một vùng chọn mới.
  • Intersect — Lấy phần giao giữa vùng chọn hiện tại và vùng chọn mới.

Lưu vùng chọn trong channel studio

 

 

Selection procedures

Alongside the many selection tools available, there are also a variety of procedures you can follow to create a pixel selection from:

The contents of a layer (see Pixel selections from layers)
The luminance of a layer (see Pixel selections from layers)
Layer and composite channels (see Pixel selections from channels)
Curves and shapes (see Pixel selections from shapes)
Tonal or colour ranges (see Range pixel selections)
Sampled colours (see Sampled colour pixel selections)
Quick Masks (see Quick Mask selections)
Previously created selections (see Creating outline selections)
About selection modes

 

To select every pixel in the image:

From the Selections Persona, do one of the following:
Two-finger tap and select Select all from the pop-up menu.
From the Commands menu, select the same option.
To invert, deselect or reselect, use the same procedure as above.

Painting pixel selections

Using the Smart Selection Brush Tool you can define a selection by painting on your page.

Default Selection Brush 'expansion' behaviour

By default the Smart Selection Brush Tool is set to expand the selection to include similar colour value pixels to those selected, even if these are not directly painted. In other words, the selection will grow up to high contrast edges within the image.

Before and after selection painted.

The number of pixels selected is determined by the size (width) of the brush in two ways:

A larger brush size will paint a larger area in one stroke and therefore more pixels are selected.
A larger brush size will give Affinity Photo a larger sample size in which to determine how far the selection should expand when selecting similar colour value pixels.
This makes selecting an area of similar colour and tone effortless.

The selection will only expand to pixels with similar colour values if they are adjacent to the stroke painted. To select a separated area, you must start another stroke within that area.

Alternative 'non-expansion' behaviour

As an alternative to the expansion method detailed above, the Selection Brush Tool also has a non-expansion method of selection. This method will only select pixels which are under the brush when the stroke is painted.

Difference in selection method between non-expansion (before) and expansion (after).

To create a pixel selection:

From the Selections Persona, select Smart Selection Brush Tool.
Adjust the context toolbar settings. (See Smart Selection Brush Tool for details.)
Drag on your page.

To change selection criteria:

With the Smart Selection Brush Tool selected, do any of the following:

Switch the tool's working Mode on the context toolbar. Add grows the existing selection or creates a second selection area; Subtract paints ways from an existing selection.
Change the brush size (Width).

Modifiers

From the startup screen's Preferences (Interface tab) you can enable On-screen modifier keys to extend the tool's functionality. From the tool's context toolbar:

Press Subtract to temporarily toggle to the Subtract working mode to piant away selection areas.
Press Toggle snapping to temporarily disable snapping while creating or modifying your selection.

To set 'non-expansion' method:

With the Smart Selection Brush Tool selected, on the context toolbar, ensure the Snap to edges option is off.

Flooding pixel selections

Using the Flood Selection Tool you can define a selection of similar colour value pixels with a single tap.

Flooding and tolerance

When using the Flood Selection Tool, Affinity Photo will analyse the target (tapped) pixel and use its colour value to create a selection which includes pixels with similar colour values.

Before and after pixel selection.

The number of pixels selected is determined by the tool's tolerance setting. The higher the tolerance the more variance allowed between the target pixel and selected pixels. Therefore a higher tolerance will likely lead to more pixels being included in the selection.

This makes selecting an area of similar colour and tone effortless.

Contiguous behaviour

By default, flood selecting is contiguous. This means pixels with similar colour values must be adjacent to one another to be selected. Therefore, pixels must be directly connected to the target pixel (or other selected pixels) to be selected. If there is a high contrast edge between areas of similar colour, the pixels on the opposite side of the edge will not be selected using a single tap.

As an alternative, the contiguous behaviour can be switched off. This will mean pixels of similar colour to the target pixel will be selected regardless of their position within the image.

Difference in selection method with contiguous on (before) and off (after).

To create a pixel selection:

From the Selections Persona, select the Flood Selection Tool.
(Optional) On the context toolbar, set the Tolerance.
Tap on your page.

To create a pixel selection using multiple target pixels:

With the Flood Selection Tool selected:

On the context toolbar, set the Mode to Add.
Tap on your page.
Repeat step 2 as needed.
Alternatively, you can subtract or intersect a 'flood selection' from the current selection using the other Mode options. For more information on the available selection modes, see Creating pixel selections.

To switch off contiguous selection:

With the Flood Selection Tool selected, on the context toolbar, ensure the Contiguous option is off.

Drawing pixel selections

Using the Polygon Marquee Tool you can draw on your page to define a pixel selection based on a freehand-drawn line, a straight-edged polygon or an area created by a line that magnetises to image edges.

Freehand selection in the process of being drawn.

To create a pixel selection:

  • From the Selections Persona, select the Polygon Marquee Tool.
  • From the context toolbar, choose a selection Type (from Freehand, Polygonal or Magnetic).
  • With the Freehand type:
    • Tap-drag to draw a freehand line that forms a selection on release.
  • With the Polygonal type:
    • Single-tap to define corners of a straight-edged polygon. Tapping back on the starting point converts the polygon to a selection.
  • With the Magnetic type:
    • Single-tap directly over strong edges in your photo. Magnetic nodes will be laid down that will snap to those edges.

Range pixel selections

You can create a pixel selection using colour, tonal or transparency (alpha/opacity) ranges from your image.

If you decide to create a selection based on any range, your image is analysed and all pixels which fall into the chosen range are included in the selection. Pixels which are not in the chosen range are excluded.

Before and after pixel selection which targeted reds.

Colour, tonal and transparency range selections are available from the Commands menu. These include:

  • From the Hue Range sub-menu:
  • Select reds
  • Select blues
  • Select greens
    From the Tonal Range sub-menu:
    Select shadows
    Select midtones
    Select highlights
    From the Transparency Range sub-menu:
    Select opaque—only pixels that are 0% transparent are selected.
    Select partially transparent—all pixels with a transparency higher than 0% are selected.
    Select transparent—only pixels which have an opacity of 0% are selected.
    Try creating range pixel selections before applying an adjustment layer. This allows you to target the adjustment directly to any one of the Colour or Tonal ranges.

Pixel selections from channels

You can create pixel selections based on a single channel or combination of channels. This feature is available from the Channels Studio.

Selection created from the image's blue channel.

Pixels are selected based on the contribution that the chosen channel makes to its colour value. If a channel only contributes partially to a pixel, that partial amount is selected (i.e. where a channel contributes 20% of the colour to that pixel, that 20% is selected).

A selection marquee only appears around areas which are selected by more than 50%. Areas selected by 50% or less will not display a marquee at their edges.

To create a pixel selection from a channel:

In the Channels Studio, tap the More Options button on the chosen channel, then Load to Pixel Selection.
To combine channels in a single pixel selection:

Create an initial channel selection using Load to Pixel Selection as above.
On another channel, tap More Options, and then Add to Pixel Selection.
Repeat step 2 as needed to include other channels.
Alternatively, you can also subtract or intersect a channel from a selection using More Options.

To create a pixel selection from a selected layer's channel:

In the Layers Studio, select a layer.
In the Channels Studio, tap More Options on a channel named after the selected layer (e.g. Pixel Red), then select Create Spare Channel
Tap More Options on the newly created Spare Channel entry and select Load to Pixel Selection.

Pixel selections from shapes

You can convert a curve or shape (path) drawn using the Pen into a selection. When created from a curve, the resulting selection will be closed using a straight line between the end nodes.

The original line or shape will be discarded when the selection is created. Ensure you keep a copy of your original line or shape if you wish to use it later in your project.

To create a pixel selection from a drawn line or shape (path):

Do one of the following:
Using the Pen draw a curve or closed shape on your page.
Select a previously drawn curve or shape and then select the Pen Tool.
From the context toolbar, tap To Selection.
You can convert geometric shapes created using the Shape tools into selections using the same procedure.

 

Sampled colour pixel selections

You can create a pixel selection by sampling a colour from pixel layers.

Before and after pixel selection.

Settings

The following settings can be adjusted from the context toolbar:

Model—determines the colour model used when sampling.
Tolerance—determines how closely pixels must match the selected colour to be included in the selection. For lower tolerance settings, pixels must be very close in value to the targeted pixel. For higher tolerance settings, pixel colour can vary widely from the targeted pixel.
To create a pixel selection from a sampled colour:

Select the pixel layer containing the colour to be sampled.
From the Selections Persona, select the Select Sampled Colour Tool.
Tap on the colour to be sampled.
Adjust the settings on the context toolbar.
Tap the tick button to apply.

Marquee pixel selections

The marquee selection tools allow you to create selections based on standard geometric shapes, such as ellipses and rectangles.

Selection tools

There are several marquee tools you can use to create pixel selections:

  • Rectangular Marquee Tool—creates a rectangular or square selection.
  • Elliptical Marquee Tool—creates an elliptical or circular selection.
  • Row Marquee Tool—creates a rectangular selection of a set pixel height which spans the entire image's width.
  • Column Marquee Tool—creates a rectangular selection of a set pixel width which spans the entire image's height.

To create a pixel selection:

With one of the above marquee selection tool selected, drag on your page.
Enable the context toolbar's Constrain option to draw square or circular selections instead of rectangular and elliptical selections.

To set the width of a row/column selection:

With the Row Marquee Tool or Column Marquee Tool selected, on the context toolbar, adjust the Height or Width setting, respectively.

Moving and transforming pixel selections

Once a selection has been made, it can be moved and transformed in a variety of ways.

Moving and transforming a selection and its contents

If you have a selection in place, you can move and transform it, and the pixels it encompasses using the Move Tool or Transform Studio,respectively.

Moving and transforming a selection only

If you're looking to reposition a selection, but leave the pixel content untouched, you can use the Marquee tools. However, if you wish to transform your selection while leaving the pixel content untouched, you need to use either the Transform Studio or the Edit Selection as Layer option. In Quick Mask mode, you can resize, reposition, rotate or shear a selection using the Move Tool or Transform Studio.

For pixel-accurate selection, Force pixel alignment (Document Menu > Snapping) will snap pixel selection areas to full pixels when created, moved or modified. If this option is off, selections can occupy partial pixels. If snapping is active, selection areas can snap to page edges and guides when being created (using the Marquee Selection Tools) or moved.

To move and transform a selection and the pixels it encompasses:

With a selection in place, select the Move Tool from the Photo Persona.
Resize, reposition, rotate or shear the selection on the page using the displayed handles or, for precision, use the settings on the Transform Studio. The pixels within the selection will be moved and transformed to match the new selection.
Every time the selection is moved or transformed, new pixels may be included within the new selection area. These new pixels will then be moved and transformed if the above procedure is followed again.

To move a pixel selection (leaving pixel unaffected):

With a selection in place, select a marquee selection tool or the Polygon Marquee Tool.
Drag inside the selection.

To transform a selection (leaving pixel unaffected):

With the Selections Persona active, from the Commands menu, select Selection as Layer > Toggle Edit Selection As Layer.
From the Photo Persona, select the Move Tool.
Resize, reposition, rotate or shear the selection on the page using the displayed handles or, for precision, use the settings on the Transform Studio.
Repeat step 1 to exit the mode and return to display the selection as a marquee.
By default, while in Edit Selection As Layer mode, the page shows a translucent, red overlay. The red areas are not included in the selection. For more information, see Edit selection as layer.

 

Edit selection as layer

Using this mode, you can modify (or create) a selection using pixel-editing tools.

When entering this mode, your selection is temporarily presented as a pixel mask. Pixels can be added or erased using the standard Painting and Erase tools.

Painting in black will erase areas from the selection.
Painting in white will add areas to the selection.
Painting a grey will vary the opacity of the selection depending on the tone of grey used.
Erased areas are always removed from a selection.
By default, while in this mode your page will show with a translucent, red overlay. After painting in white, the resulting untinted areas will not be included in the selection. This default view can be changed depending on your preferences.

You can create a new selection from scratch using the Painting tools by entering Edit Selection as Layer mode without a selection in place. Tools which can be used include, but are not limited to, the Erase Brush, Flood Fill Tool, Gradient Tool, Paint Brush, Paint Mixer Brush and Pixel Brush.

To edit a selection using Edit Selection as Layer mode:

With the Selections Persona active, from the Commands menu, select Selection as Layer > Toggle Edit Selection As Layer.
Tap or drag on the page using any pixel-editing tool. Painting with white or grey will 'unmask'.
Repeat step 1 to exit the mode and return to display the selection as a marquee.
(Optional) To create a layer mask using the current selection, from the Layers Studio, select New Mask Layer.
To change Edit Selection As Layer view:

From the Commands menu, select a 'Show' option from the Selection as Layer sub-menu.

Refining pixel selection edges

Once a selection has been created, you can refine its edges to ensure your selection is as accurate as needed.

For very fine selection, e.g. of hair against a coloured background, you can use an adjustment brush as part of the refinement to 'brush-in' fine detail.

To refine pixel selection edges:

With a selection in place, from the Selections Persona, select Refine Selection Tool.
Adjust the context toolbar settings. (See Refine Selection Tool for details.)
If you wish to adjust the selection edges by painting with the adjustment brush, set a Brush width that encompasses the detail to be included in the selection, then drag over the detail (e.g., hair) next to the selection edge.
Tap the tick button to apply.

Creating outline selections

The Outline selection feature allows you to create a new selection based on the outer edges of a previously created selection.

Before and after outline selection created.

Settings

The following settings can be adjusted from the context toolbar:

Radius—controls the width of the selection.
Circular—when selected, the selection edges become increasingly rounded with increasing Radius values.
Alignment—determines the origin for the expansion.
To create an outline selection:

With a selection in place, from the Selections Persona, select Outline Selection Tool.
increase the Radius value to form the outline, then adjust further context toolbar settings if needed.
Tap the tick button to apply.

No comments

Leave your comment

In reply to Some User