Jump to content

Applying mask layer removes image in Affinity Photo


Recommended Posts

Hi 

I want to cut out the background of an image. But when I make a selection with the brush selection tool and click on the mask layer icon, the area I want to keep, becomes transparent. I have spent hours trying to find a solution, but nothing seems to work. I have tried with other images as well, and I get the same result. 

Can you help?

I have attached two images - one before I apply the mask layer, and one after. I hope this helps you identify the issue. 

 

before-applying-mask.png

mask-applied.png

Link to comment
Share on other sites

Menu Selection, Invert selection?

P.S. Selected background is transparent, what's the use of his masks?

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

Link to comment
Share on other sites

22 minutes ago, Pšenda said:

P.S. Selected background is transparent, what's the use of his masks?

Delete the mask layer, then invert the selection and then create a mask.

Just to clarify, you have selected the background, not the macbook?

For the method you used in your post, selecting the macbook and clicking the mask icon in the layers panel would have gotten you what you want.

iMac 27" Late 2019 Fully Loaded, iMac 27" Late 2013 both running Catalina 10.15.7 - Affinity Designer, Photo & Publisher, Adobe, Inkscape, Blender, C4D, Sketchup, Pepakura Designer + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

NB: If you have already created a mask, and still have the selection active, delete the selection before inverting the mask. (Otherwise, you only invert the mask within the selection and the whole thing disappears!)

Acer XC-895 : Core i5-10400 Hexa-core 2.90 GHz :  32GB RAM : Intel UHD Graphics 630 : Windows 10 Home
Affinity Publisher : Affinity Photo : Affinity Designer (latest release versions) | Affinity Photo for iPad

Link to comment
Share on other sites

Thanks your replies: 

I tried to delete the mask, invert the selection, and then apply the mask again. Now the macbook remains, but it looks as if it has not been cut out from the background. 

When I try to export the image as a jpeg, the white background is still there. And if I click on the image (including the mask), and copy it to a new document, the background is also there. 

exporting-image.png

copied-to-new-document.png

Link to comment
Share on other sites

5 minutes ago, Mr. Brown said:

When I try to export the image as a jpeg, the white background is still there.

You can't have transparency in a JPEG, use PNG instead.

Acer XC-895 : Core i5-10400 Hexa-core 2.90 GHz :  32GB RAM : Intel UHD Graphics 630 : Windows 10 Home
Affinity Publisher : Affinity Photo : Affinity Designer (latest release versions) | Affinity Photo for iPad

Link to comment
Share on other sites

Your original image is PNG with transparent background? Why don't you use this picture right away, but are you doing some weird background erasing that isn't there anyway (it's transparent) using a mask?

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

Link to comment
Share on other sites

54 minutes ago, Pšenda said:

Your original image is PNG with transparent background? Why don't you use this picture right away, but are you doing some weird background erasing that isn't there anyway (it's transparent) using a mask?

I don't want a background - just the macbook cut out. Below you can see what happens when I try to drag the image around on the canvas. Although I have applied a mask to the mackbook selection, it keeps the background, and leaves behind an imprint of the image. The original image is a PSD file that I then exported as a jpeg file and opened in a new Affinity Photo document because I had the same issue when trying to remove the background in the PSD file. 

moving-image-on-canvas.png

Link to comment
Share on other sites

It looks like you have some sort of feathering on the selection, regardless, it will probably be easier to use a filled curve to mask/clip the image and then crop the extra canvas so that it's a nice tight crop. the beauty about using a curve to mask is it remains easily editable, if you save the file as an afphoto file. 

  1. Select the pen tool and set the stroke to red and width to 0.5pt or 2-3 px Red is good for visibility of the drawn curve.
  2. Start to click around the macbook until you end up where you started, if need be, you can edit the position of the nodes later and add remove nodes to improve the curve clipping
  3. In the colour panel remove the stroke colour and add a black fill
  4. Check the curve layer is above the image, now right-click to select Mask to below
  5. Go to the top menu and click Document > Clip Canvas This will remove any of the extraneous unwanted background.
  6. Now you can refine the nodes to improve the clipping mask.
  7. Export to a format that supports transparency like PNG.

 

 

 

 

iMac 27" Late 2019 Fully Loaded, iMac 27" Late 2013 both running Catalina 10.15.7 - Affinity Designer, Photo & Publisher, Adobe, Inkscape, Blender, C4D, Sketchup, Pepakura Designer + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

I'm sorry, but I don't understand what you mean by, " it keeps the background, and leaves behind an imprint of the image". Can you explain what the "issue" is when you remove the background, as it looks like you have already done what you wanted to do, and have removed the background, leaving just the MacBook image!

Acer XC-895 : Core i5-10400 Hexa-core 2.90 GHz :  32GB RAM : Intel UHD Graphics 630 : Windows 10 Home
Affinity Publisher : Affinity Photo : Affinity Designer (latest release versions) | Affinity Photo for iPad

Link to comment
Share on other sites

2 hours ago, Mr. Brown said:

I don't want a background - just the macbook cut out.

That is perhaps clear. But the question is, why do you remove the background from the image when it is no longer there.

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

Link to comment
Share on other sites

On 6/19/2022 at 4:18 PM, firstdefence said:

It looks like you have some sort of feathering on the selection, regardless, it will probably be easier to use a filled curve to mask/clip the image and then crop the extra canvas so that it's a nice tight crop. the beauty about using a curve to mask is it remains easily editable, if you save the file as an afphoto file. 

  1. Select the pen tool and set the stroke to red and width to 0.5pt or 2-3 px Red is good for visibility of the drawn curve.
  2. Start to click around the macbook until you end up where you started, if need be, you can edit the position of the nodes later and add remove nodes to improve the curve clipping
  3. In the colour panel remove the stroke colour and add a black fill
  4. Check the curve layer is above the image, now right-click to select Mask to below
  5. Go to the top menu and click Document > Clip Canvas This will remove any of the extraneous unwanted background.
  6. Now you can refine the nodes to improve the clipping mask.
  7. Export to a format that supports transparency like PNG.

 

 

 

 

Thank you so much for taking the time to record the video! I am very grateful for that. I followed the steps and was finally able to remove the background. Enjoy your day.

Link to comment
Share on other sites

On 6/19/2022 at 4:39 PM, PaulEC said:

I'm sorry, but I don't understand what you mean by, " it keeps the background, and leaves behind an imprint of the image". Can you explain what the "issue" is when you remove the background, as it looks like you have already done what you wanted to do, and have removed the background, leaving just the MacBook image!

The issue was that there was a lot of space around the MacBook (the sides and the bottom), and I wanted to remove that. I hope that makes more sense.

 

On 6/19/2022 at 4:46 PM, Pšenda said:

That is perhaps clear. But the question is, why do you remove the background from the image when it is no longer there.

There is a background - it is just transparent. What I wanted to do was to remove the space around the image, so I had a clean cut of the MacBook without the extra canvas at the bottom and the sides. I hope that makes more sense. 

 

FYI - I have solved the issue now. Thanks for your inputs everyone. 

Link to comment
Share on other sites

3 minutes ago, Mr. Brown said:

The issue was that there was a lot of space around the MacBook (the sides and the bottom), and I wanted to remove that. I hope that makes more sense.

Just for future reference, or for anyone else who may have a similar problem, just go to Document > Clip Canvas.

Acer XC-895 : Core i5-10400 Hexa-core 2.90 GHz :  32GB RAM : Intel UHD Graphics 630 : Windows 10 Home
Affinity Publisher : Affinity Photo : Affinity Designer (latest release versions) | Affinity Photo for iPad

Link to comment
Share on other sites

15 minutes ago, PaulEC said:

Just for future reference, or for anyone else who may have a similar problem, just go to Document > Clip Canvas.

But surely that can only work for a rectangular design, if one is exporting to a raster format?

And this discussion is not about a rectangular design.

-- Walt

   Desktop: new:  Windows 11 Home, version 21H2 (22000.613) 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090  (old: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970 )
   Laptop:  Windows 10 Home, version 21H2 (19044.1706) 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Affinity Photo 1.10.5 (.1342) and 1.10.5.1342 Beta   / Affinity Designer 1.10.5 (.1342) and 1.10.5.1342 Beta  / Affinity Publisher 1.10.5 (.1342) and 1.10.5.1282 Beta
 iPad Pro M1, 12.9", iPadOS 15.4.1, Apple Pencil 2, Magic Keyboard

  Affinity Photo 1.10.5 (.280) and 1.10.2 (.266) Beta / Affinity Designer 1.10.5 (.21) and 1.10.3 (.19) Beta 

Link to comment
Share on other sites

2 hours ago, walt.farrell said:

But surely that can only work for a rectangular design, if one is exporting to a raster format?

And this discussion is not about a rectangular design.

The discussion was about the OP finding a solution to his problem, although it wasn't immediately apprent what that problem was. Clipping Canvas is relevant to anybody who wishes to remove dead space around an object so the crop is as tight and neat as possible to the extremities of any object.

@PaulEC referencing of Clip Canvas is valid not only because it was the solution that solved the problem but as a clarification of that solution for future readers. The OP mistakenly thought that making a selection around the object would remove the dead space but in our posts he saw that what he really needed to do was Clip Canvas. 

Result is one happy OP :)

iMac 27" Late 2019 Fully Loaded, iMac 27" Late 2013 both running Catalina 10.15.7 - Affinity Designer, Photo & Publisher, Adobe, Inkscape, Blender, C4D, Sketchup, Pepakura Designer + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

17 minutes ago, firstdefence said:

Clip Canvas is valid not only because it was the solution that solved the problem but as a clarification of that solution for future readers.

I appreciate it as a clarification, as I don't think anyone actually mentioned that term earlier.

However, my point is that it's not completely a solution for the problem (even if it made the OP happy). The OP started with something like this, and wanted to remove the background (transparent) part:

image.png.4814c9e164dc02b1594d3a3f37d9b62d.png

Clip Canvas will reduce the amount of the transparent background, but it won't remove all of it:

image.png.b0c43d5fd5bbd7a611e7710519ae6920.png

The canvas (and any exported raster image) will still be rectangular, and therefore some of that transparency (as shown by the checkerboard) will remain.

 

-- Walt

   Desktop: new:  Windows 11 Home, version 21H2 (22000.613) 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090  (old: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970 )
   Laptop:  Windows 10 Home, version 21H2 (19044.1706) 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Affinity Photo 1.10.5 (.1342) and 1.10.5.1342 Beta   / Affinity Designer 1.10.5 (.1342) and 1.10.5.1342 Beta  / Affinity Publisher 1.10.5 (.1342) and 1.10.5.1282 Beta
 iPad Pro M1, 12.9", iPadOS 15.4.1, Apple Pencil 2, Magic Keyboard

  Affinity Photo 1.10.5 (.280) and 1.10.2 (.266) Beta / Affinity Designer 1.10.5 (.21) and 1.10.3 (.19) Beta 

Link to comment
Share on other sites

The original post wasn't explained very well but that's part of the fun in solving the issue, when I made the video and added the Clip Canvas step I think the OP realised what he was trying to do wasn't going to work but the Clip Canvas was the solution he was looking for. I don't think he meant he wanted to. get rid of all the checkerboard, just the checkerboard that was not needed.

But I get where you are coming from.

iMac 27" Late 2019 Fully Loaded, iMac 27" Late 2013 both running Catalina 10.15.7 - Affinity Designer, Photo & Publisher, Adobe, Inkscape, Blender, C4D, Sketchup, Pepakura Designer + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

16 hours ago, walt.farrell said:

And this discussion is not about a rectangular design.

The OP (finally) said, "The issue was that there was a lot of space around the MacBook (the sides and the bottom), and I wanted to remove that."

firstdefence is, of course, perfectly correct that, to remove the background completely, the best way is to use a clipping path. However, as the OP had already started working with a mask, and, going on what he said he wanted to achieve, the simplest solution seemed to me to clip the canvas.

It's only fair to add, that although clipping paths are great for comparatively simple shapes and vector objects, they are by no means appropriate in all situations. The picture in question is a raster image and the picture is very simple, making it easy to create a clipping path using the Pen Tool. However, if it had been more complex, a dog with a shaggy coat for example, it could have been difficult, if not impossible, to draw a satisfactory path. Therefore, it seemed reasonable to point out that, the quickest, easiest way to remove the excess transparent area, in this and similar cases, is to use clip to canvas.

Acer XC-895 : Core i5-10400 Hexa-core 2.90 GHz :  32GB RAM : Intel UHD Graphics 630 : Windows 10 Home
Affinity Publisher : Affinity Photo : Affinity Designer (latest release versions) | Affinity Photo for iPad

Link to comment
Share on other sites

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...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.