Post-Processing » Affinity Photo Tutorials » How to Remove a Background in Affinity Photo

How to Remove a Background in Affinity Photo

One of the major tasks in some types of photo editing is to remove a background in Affinity Photo. You might need it to remove the background completely for a product photo or to add a different background for a composite, or do multiple-image composite in the form of matte painting. Magazine editors will also often need this technique in order to wrap text nicely around the cut-out image in an app like Affinity Publisher.

You might have already done background removal at some stage in life, or you are going to do it at some point. In this Affinity Photo tutorial on removing backgrounds, we look at tools one by one.

Download a FREE Affinity Photo Quick Start Guide – made with photographers in mind

Our Tough Sample for Removing A Background in Affinity Photo

Yes, we chose a Scottish Highland bull, as our model. These long strands of fur/hair, and as we look closer at our sample image, we realize what a beautiful mess it is going to be trying to remove the background.

I have picked this image to demonstrate the background removal techniques in Affinity Photo because with a more complex case, I can show you multiple different techniques and show which are best for the task. If you can remove the background from this image, you can remove it from any image.

We are going to look at them further in detail, perhaps again and again. So the first lesson – background removal is about patience, and also about knowing the tools. One tool might not be enough to give you the result, so you may need more than one tool for the same purpose. This, at times, can be a time-saver.

AFFINITY PHOTO Workflow Video Course

Stop fumbling around in Affinity Photo Begin to use it like a PRO

$29.00


__CONFIG_colors_palette__{“active_palette”:0,”config”:{“colors”:{“62516”:{“name”:”Main Accent”,”parent”:-1}},”gradients”:[]},”palettes”:[{“name”:”Default Palette”,”value”:{“colors”:{“62516”:{“val”:”var(–tcb-color-4)”,”hsl”:{“h”:46,”s”:0.8692,”l”:0.01}}},”gradients”:[]}}]}__CONFIG_colors_palette__
LEARN AFFINITY PHOTO NOW!

The Pen Tool is Perfect for Removing the Background in Affinity Photo – for Some Images

There’s nothing better than the pen tool for point-perfect selections. It works wonders in many images with simple lines and edges. Though, as you will reach up to the hair of this furry model, you will realize the problem with the pen tool. The hairs are too thin, require too many curves, and it will be a constant mix of making a mask, and then removing parts of it, until you get the perfect mask.

Anyway, let us continue in our search for the perfect tool for using Affinity Photo to remove the background with the more difficult image of a furry animal.

Related articles: Check out our other Affinity Photo Tutorials

Specific Tone/Color Selection Tools

There are different selection tools based on tones and colors. The four of them are:

  1.  Select by Color Range – where you can select reds, blues, and greens. Absolutely no control, but it is handy in some selections, especially while toning.
  2.  Select by Tone – where you can select mid-tones, highlights, and shadows. Again, no control. But it has its uses too.
  3.  Select by Alpha Range – when working with PNG and TIFF files, you may have transparent areas, opaque areas, and the ones between them. This selection caters to those.
  4.  Select Sampled Color – where you get all the control. Let’s try clicking that.
Select sampled color tool can sometimes help you create the selection you need to remove the background in Affinity Photo

There are four different modes and a tolerance slider. The RGB Mode lets you select colors based on sampling. The CIELAB Mode is about perceived colors and is a more natural and intuitive selection of colors.

Intensity Mode helps in selecting areas based on intensity. And the Alpha Mode is based on transparency.

As you may notice, the first two modes are basically the custom version of ‘Select by Color Range’, the third is a custom version of ‘Select by Tone’ (the pixel intensity in Affinity is measured by turning the image grey-scale), and the fourth is the custom version of ‘Select by Transparency’. Basically, it has all three modes, but with a custom sampling and tolerance tool.

Use select sampled color to create a selection before removing the background (RGB mode)
Select via RGB Mode

Custom Sampling is when you click a random sample in an image. Like we have clicked the hair portion. When you click and drag, the selection gets expanded. And when you alt + click, it gets reduced.

The tolerance is to simply select how much or how less of the similar color/tone selection you require.

As you might notice, this isn’t the right way for selection in this image because of the different shades of hues in the hair. Furthermore, the background is merging with the subject in a few areas. However, if it was a simpler case, it would have worked like a charm.

CIELAB mode for selecting sampled color
Selection via CIELAB Mode

Flood Select Tool (W) does a similar job to sampled color, albeit faster. Although it lacks the tolerance control, and in fact any control. It is simply click to select, ‘alt’ or ‘opt’ to remove from selection, and ‘ctrl’ or ‘cmd’ to add to selection.

Important Tip: Add to the selection step by step

You might have noticed by now that no selection works perfectly. It might appear, even after finishing everything, that no selection works on the whole.

Faster selections are often a result of knowledge of the best tool for the job. So if there’s a situation that can’t be dealt with using any other tool, an editor will move to the pen tool and finish it off rather than trying different easier solutions. And he will choose easier and quicker solutions for the selections that they work. In the end, it is about adding all the selections to make a whole, and it often makes the job easier.

The Magic Tool – Selection Brush Tool

I mentioned that there may not be any perfect tool for removing background in Affinity Photo, and yet I introduce you to the Selection Brush Tool (W) as the magic tool.

Firstly, it is a magic tool considering all it can do. Secondly, it has its drawbacks and shortcomings. More on that later. For now, time for some magic.

Selection by the Magic Tool is simply about clicking and dragging. So we will slowly click and drag from the edges towards the bottom right and then move upwards towards the face of the cow. Slowly, we will drag towards the hair.

The idea is to make a rough selection around the areas where we aren’t sure yet. It will not be a perfect selection, especially in areas like the hair.

Once we are okay with our selection, almost perfect at most places, while not being okay around the edges, we hit the magic button.

Refine selection
Base Selection via Selection Brush Tool

Refine, on top, is the magic button for selections. It gives us control that can help us achieve almost any selection. When we click Refine, the dialog box opens with an overlay mode, the selection being visible, while the non-selection being red.

The refine adjustment brush is currently in Matte mode, which gives control to Affinity Photo’s algorithm in selections. This is an ideal start for us.

Now we slowly start painting around the hair area, letting Affinity do its smart selections. As you might see, the selection is being re-recorded, and the edges being refined already. Let’s do this all over the edges of the beautiful hair.

Working with Refine Brush in Affinity Photo (The brush is calculating after you have painted over the areas)
Working with Refine Brush (The brush is calculating after you have painted over the areas)

The important tip is to try and start the brush from the areas you are sure to be selected, even if it gets repeated, and slowly hover around the edges. Also, take small selections. You may change brush size with [ and ] as the need arises. For delicate areas, small brush size is a great idea.

Now when you might think that this is so easy, and we are getting the result – we change the mode to something else. One between black and white matte will give you an idea about how sharp or accurate your selections seem to be, and also if there’s any mess around that needs cleaning up. It appears that the selection is accurate here, with a minor issue here and there. But let me go ahead and explain further points in this image anyway.

The final result after removing the background in affinity photo
Final Result

By choosing “Foreground” in the adjustment settings brush, we tell Affinity Photo that this is a part we want in our selection. The algorithm of Affinity will be at work, but it will take care to notice the larger portion.

So if your brush is not accurate most of the time, it might result in problems around the selections. Therefore, a smaller brush and smaller strokes work better. Next, we brush over some hair area which clearly seems lost, and red curves appear.

We try and paint over them with a very thin brush. It might be accurate, but it might also select extra portions. With the “Background” mode of the refine adjustment brush, we can remove the extra portions from across the image.

Now one final step towards better selection is to work zoomed in on the hair and check the missing link between hair. And just do a brush movement in Matte mode only. This step isn’t mostly needed, but in difficult selections, this can help. Very small strokes for areas where you see something missing.

You will likely encounter trouble areas when removing the background from more complex images in Affinity Photo
Noticing the Pain-points

Here, an important part worth discussing is that you can’t do a 100% perfect selection.

In such cases, choosing for complete selections and letting go of some selections that are frizzy is a good tip. Also, your selections need to appear complete. So if you don’t select a small strand of hair, don’t select it at all.

Don’t start the selection and then end it abruptly. The idea is to cheat smartly because we can’t be perfect.

Refining selections is indispensable in removing backgrounds in Affinity Photo making it look more natural
Re-refining in Black and White Matte Mode – looking at issues and trying for a smoother selection.

When we finally hit apply and click on ‘mask’, we might still notice improper selections. We now have to paint over selections with a brush on the layer mask.

Select a white color, activate the layer mask, and begin to paint in the selection. It solidifies the selections, thus taking out those small unwanted parts by making them complete. The selection appears much fuller now after the brush. Now let’s try putting a background behind the selection.

Changing the background enables you to see where you still need to work on your selection
Final Selection

Let’s see how to improve this selection further. Also, remember, you have to let go of certain areas in such selections that don’t look good, like on its right cheek (left in photo). You can get rid of this area by deleting it from the mask, and make sure the final selection looks natural.

However, if you are not satisfied with your result, there’s a way to improve the selection even further.

Let’s start from the start. Duplicate the image file in a new layer. And instead of using the Magic Tool directly, we would first work on the image to improve our chances of selection.

Here, I simply add a contrast adjustment layer and then use the same method as above. I’m working quickly over the hair area.

Now see only the hair area of the image, and how it compares with the previous version. Reason? It is because contrast somehow improves the image in focus, while the background, usually slightly blurred, gets further out of focus. This gives the software algorithm something more to work with.

After that, you can remove the contrast layers. The same method will work even in case of other adjustments like layers, curves, or saturation – anything that creates more separation and adds more contrast to the image, thereby making the selection for the software easier.

Adding contrast to a duplicate layer can make it easier for you to create the selection used for removing the background of an image in Affinity Photo
Adding Contrast and Reducing Brightness for doing the Selection Again
A Slightly Better Selection. Note: You have to still remove extra areas once you put it on a background.
A Slightly Better Selection. Note: You have to still remove extra areas once you put it on a background.

How? Simply change the mode to Selection Brush Tool after your selection is done. The ‘Refine’ button will appear. Now do all the adjustments you want to do, and it will work much like the same way. So you can do this image also by using the pen tool, roughly, and then hitting the refine tool.

Final Words

The Pen tool is a great tool. The selection brush tool, however, is the ultimate tool. The ‘Refine’ tool in the Selection Brush Tool is how complex selections like hair are done in Affinity.

For most other selections, the pen tool is not up for the task. So, why not selection brush tool for everything?

You cannot always use the magic tool to remove backgrounds in Affinity Photo
Why Pen is Mightier than Selection Tool (At Some Places)

As you can see with this example above, it can mess up big time, especially when similar hues and tones are there. For such images, the pen tool will give quick and accurate results, while adjusting the selection here may end up taking much more time without giving proper results.

What if the subject is mixed? As mentioned above, you can simply add up different selections, by selecting by parts, instead of full selection in one go. So easier areas with Selection Brush Tool, slightly difficult with Pen Tool, and the ones like we worked on with any selection followed by ‘Refine’ tool.

As I have demonstrated you can remove the background in Affinity Photo in even the most diffucult scenarios.

Not an Affinity Photo user yet? You can get Affinity Photo here.

1 thought on “How to Remove a Background in Affinity Photo”

  1. Affinity is so complicated. In photoshop I used to use the selection tool to select a colour and click delete and it was gone leaving the wonderful transparent background. I really cannot find out how to do such a simple task in affinity photo.

    I am not a photographer. I use it to prepare images for doing my paintings so I do not need these fine adjustments.

    Reply

Leave a Comment

Item added to cart.
0 items - $0.00