Jump to content

Recommended Posts

Posted

Hi, I am working with images of flowers and need to change the background color which is white. These are very complex images with lots of stems, leaves and thread like elements. I have been using the Flood Fill tool which is doing a great job to change the background. However, I want to change the background to a gradient background in some cases and am wondering if I can save the Flood Fill changes to an Alpha channel and swap the backgrounds at will. 

This question refers to Photo version 1. 

Thanks!

Affinity Photo and Design V1. Windows 10 Pro 64-bit. Dell Precision 7710 laptop. Intel Core i7. RAM 32GB. NVIDIA Quadro M4000M.

Posted

If you are going to change the background color or replace it with a gradient or image, it is definitely better to delete the background and insert it as a separate layer (you can have several, and try to choose the best one).

Other background colors may indicate that the selection was not entirely optimal (the white from the original background will show through at the edges), so erasing the original background may require additional corrections.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Posted
2 hours ago, Pšenda said:

If you are going to change the background color or replace it with a gradient or image, it is definitely better to delete the background and insert it as a separate layer (you can have several, and try to choose the best one).

@henryanthony, ... and if you use a vector object (e.g. Rectangle Tool) for the separate background you can easily assign colour swatches, solid or gradient, or change an assigned colour live via the Colours Panel.

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

Posted
13 hours ago, thomaso said:

and if you use a vector object (e.g. Rectangle Tool)

Fill layer is more convenient - no need to think about object dimensions and placement.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Posted

So, let me pose the question in a slightly different manner. Here is an image that I am working with. One among over 50. Image background is almost 100% white. Using the Fill Flood tool, I can select with good precision the white background and change the color. A little more manual work takes care of the smaller details within the image that Fill Flood missed.

I am trying to determine a workflow to, ideally, create an alpha channel from the white background in order to manipulate the background at will. My question to the forum is: How would you approach this? Not looking for an exact answer, but maybe some new ideas or directions.

Thanks!

58 Botanical Floral Rose Russ Mills.jpg

Affinity Photo and Design V1. Windows 10 Pro 64-bit. Dell Precision 7710 laptop. Intel Core i7. RAM 32GB. NVIDIA Quadro M4000M.

Posted
9 minutes ago, henryanthony said:

Image background is almost 100% white.

I think there are a few mistakes visible in the background here - probably from his previous poor deleting.
image.png.73c21ede86806c9f02d140b32a5982b4.png

Also, if you only have these JPEG files, which have a lot of artifacts, then a "clean" background selection will take quite a bit of work. Try ML, maybe it can handle it 🙂

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Posted
1 hour ago, henryanthony said:

am trying to determine a workflow to, ideally, create an alpha channel from the white background in order to manipulate the background at will. My question to the forum is: How would you approach this? Not looking for an exact answer, but maybe some new ideas or directions.

Rather than using an Alpha Channel, I would use the Colour Picker Tool to sample the background. 

I would then pull down the Select menu and choose Select Sampled Colour, setting the Tolerance to around 5%, leaving the Model as RGB Cube. Click Apply.

I would then chose the Selection Brush Tool and in the Contextual Menu Bar click Refine...

Screenshot2025-04-29at17_25_08.thumb.png.e834159a2fa663b64c91b9b030d35d9a.png

This gives a pretty good selection without any further modification, and any missing areas can be cleaned up in the next steps.

Click Apply, then pull down the Select menu and choose Invert Pixel Selection.

In the Layers panel, make sure that the Background layer is selected and add a Mask Layer. This will be nested to the image and give you a transparent background.

Screenshot2025-04-29at17_32_02.thumb.png.4fa223af05f46e25fb8a5caf1d53e7eb.png

At this point you no longer need the selection, so pull down the Select menu and choose Deselect. From here on, whenever you need to, you can activate the Mask layer and paint on it in black with a small soft brush (to mask out areas of the image), or in white (to add areas in).

Now pull down the Layer menu and choose New Fill Layer. Drag this layer down to the bottom of the layer stack.

The image will now have a background with the default Foreground Colour (white in this instance):

Screenshot2025-04-29at17_35_11.thumb.png.ce9c559db00242e39d9f110911375f80.png

 

Select the Move Tool (or anything that isn't a brush) and open the Colour panel. 

With the Fill layer active, choose whatever colour you like and the background will change:

Screenshot2025-04-29at17_38_31.thumb.png.c175bd991258cf3955e88ea375dc6242.png

Using the Gradient Tool on the Fill layer will give you more variety.

You can also File>Place a second image and position it below the Mask layer in the layer stack if you want ( I personally wouldn't):

Screenshot2025-04-29at17_43_53.thumb.png.aa95061f8bb8063b8f625cae7b9e6174.png

afphoto (v2.6) file attached as an example, without the clouds.

flowers & background.afphoto

Affinity Photo 2.6.3,  Affinity Designer 2.6.3 Affinity Publisher 2.6.3, Mac OSX 15.5, 2018 MacBook Pro 15" Intel.

Posted

If the background is white and white is not used for anything else, erase white paper does wonders. 

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Thank you for all the advice. Might take a few days for me to work through all the information and report on progress. 😊

Affinity Photo and Design V1. Windows 10 Pro 64-bit. Dell Precision 7710 laptop. Intel Core i7. RAM 32GB. NVIDIA Quadro M4000M.

Posted

@h_d Allright, Took me a bit of doing but finally figured out your methods. WORKS GREAT!!!!!!! Thank you for preparing such detailed instructions. I really appreciate the time it took you to prepare your tutorial. This will save me hours and hours of time. Sample provided could still use a few hand done tweaks.

Thank you!!!!!!!

58 Botanical Floral Rose.jpg

Affinity Photo and Design V1. Windows 10 Pro 64-bit. Dell Precision 7710 laptop. Intel Core i7. RAM 32GB. NVIDIA Quadro M4000M.

Posted
18 hours ago, NotMyFault said:

If the background is white and white is not used for anything else, erase white paper does wonders. 

@NotMyFault If you please, I don't understand what you mean by "erase white paper". I am using Photo V1. Could this be a PV2 feature? Thanks!

Affinity Photo and Design V1. Windows 10 Pro 64-bit. Dell Precision 7710 laptop. Intel Core i7. RAM 32GB. NVIDIA Quadro M4000M.

Posted
18 hours ago, NotMyFault said:

If the background is white and white is not used for anything else, erase white paper does wonders. 

The problem with using Erase White Paper is that it will erase all white in the image, not just pure white areas, so any colour which is partially white will become semi transparent. This can cause some weird effects, depending on the new background!

Untitled.thumb.png.a73436d7ae807d600ecbb2fab7719e05.png

Acer XC-895 Core i5-10400 Hexa-core 2.90 GHz : 32GB RAM : Intel UHD Graphics 630 – Windows 11 Home - Affinity Publisher, Photo & Designer, v2
(As I am a Windows user, any answers/comments I contribute may not apply to Mac or iPad.)

Posted
47 minutes ago, PaulEC said:

The problem with using Erase White Paper is that it will erase all white in the image, not just pure white areas, so any colour which is partially white will become semi transparent. This can cause some weird effects, depending on the new background!

Untitled.thumb.png.a73436d7ae807d600ecbb2fab7719e05.png

That is correct. I didn’t have time to describe the full process.
To avoid, more steps are required. Add a levels adjustment, choose alpha, set white level to a small value, typically below 10. they tunes alpha channel to only keep only almost full transparent areas, and make semitransparent areas back opaque.

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted
1 hour ago, henryanthony said:

@NotMyFault If you please, I don't understand what you mean by "erase white paper". I am using Photo V1. Could this be a PV2 feature? Thanks!

It is a destructive filter in the „color“ section.

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted
22 hours ago, h_d said:

Rather than using an Alpha Channel, I would use the Colour Picker Tool to sample the background. 

I would then pull down the Select menu and choose Select Sampled Colour, setting the Tolerance to around 5%, leaving the Model as RGB Cube. Click Apply.

I would then chose the Selection Brush Tool and in the Contextual Menu Bar click Refine...

For whatever reason, this does NOT work on my MacBook Pro M4 (Sequoia, Photo v2.6.2). Maybe I'm doing something wrong, but I've tried it a dozen or more times and even closed Photo and rebooted my computer. Select Sampled Color does not retain the selection when going into Refine Selection. The entire canvas remains pink with Overlay preview selected, or fully Black with Black & White preview selected. If I deselect Matte Edges, it shows differentiation between foreground and background, but with Matte Edges Checked, it seems to ignore any selection made when using Select Sampled Color.

If I use Select Sampled Color, then create a Mask directly from an inverted selection, without first entering Selection Refinement, it seems to work fine. Anyone else seeing this? Or am I doing something wrong?

The other selection tools work fine when entering Selection Refinement (Freehand Selection Tool, Selection Brush, Flood Select, etc).

EDIT: Turning OFF Metal Hardware Acceleration on my MBP solved the issue. It works as it should now. 

2024 MacBook Pro M4 Max, 48GB, 1TB SSD, Sequoia OS, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish, Wacom Intuos 4 PTK-640 graphics tablet, 2TB OWC SSD USB external hard drive.

Posted
3 hours ago, thomaso said:

Thanks @thomaso I actually did search for it in Help and assumed it would have returned based on my search criteria but, alas, I needed Help with Help.🤣

Affinity Photo and Design V1. Windows 10 Pro 64-bit. Dell Precision 7710 laptop. Intel Core i7. RAM 32GB. NVIDIA Quadro M4000M.

Posted
48 minutes ago, henryanthony said:

alas, I needed Help with Help.

I agree totally.

Help is usually technically accurate, but all too often, it doesn't shed much light on how some features work or even what they do, which leaves users scratching their heads. They often state the obvious, (e.g., the tolerance slider adjusts the tolerance...well Duh!), but Help needs clear, amplified explanations, preferably with illustrated examples to show what a feature does, where it can be used, and how the controls, sliders and features work, so it becomes clear to users. Not holding my breath.

2024 MacBook Pro M4 Max, 48GB, 1TB SSD, Sequoia OS, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish, Wacom Intuos 4 PTK-640 graphics tablet, 2TB OWC SSD USB external hard drive.

Posted
24 minutes ago, Ldina said:

They often state the obvious, (e.g., the tolerance slider adjusts the tolerance...well Duh!), but Help needs clear, amplified explanations, preferably with illustrated examples to show what a feature does, where it can be used, and how the controls, sliders and features work, so it becomes clear to users.

It’s all very well being told how the controls work, but all too often the Help doesn’t even tell us how to access those controls.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.5.1 (iPad 7th gen)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.