Jump to content

Recommended Posts

In GIMP if I wanted to remove the white background on the attached image there's an easy way to do it by going to Colors/Color to Alpha. 

I know if the background is white I can go to Filters/Colors/Erase White Paper but that only works if the color is white which is fine for my image but what about if it is Cyan?

My question is how can I do this Color to Alpha thing in Affinity Photo?

lineart.png


"Procrastination is the enemy of productivity!" ~Michael

Share this post


Link to post
Share on other sites

One way...

If you have black line art on a Cyan/coloured background

Add a Black and White Adjustment layer to it

Bake in the adjustment (Rasterise, Merge, Flatten etc)

Then use the Filters > Colours > Erase White Paper command


Due to the fact that Boris Johnson is now our Prime Minister, punctuation, spelling and grammar will never be worried about ever again.  We now have far bigger problems to be worried about.

Share this post


Link to post
Share on other sites

Using Colours to Alpha in Gimp is Okay for solid even colours, but with gradients and coloured shading its next to useless. It would be faster to trace the black lines and scan it in and convert to vectors.


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo & Publisher - Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

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

Share this post


Link to post
Share on other sites

You can try this.

 


Affinity Store: Affinity Suite (ADe, APh, APu) 1.8.5.703.
Windows 10 Pro, Version 2004, Build 19041.508.
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.

Share this post


Link to post
Share on other sites

It might be an idea to explain the reason for the question. Are you asking if the Black lines are Cyan or the image itself is coloured in-between the black lines is cyan?

This is the Deviantart 18th Birthday Asset image that you can download and colour.

lineart-asset.jpg?171


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo & Publisher - Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

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

Share this post


Link to post
Share on other sites
34 minutes ago, firstdefence said:

Are you asking if the Black lines are Cyan or the image itself is coloured in-between the black lines is cyan?

I read it as the latter:

Quote

I know if the background is white I can go to Filters/Colors/Erase White Paper but that only works if the color is white which is fine for my image but what about if [the background color] is Cyan?

 

In other words, I think the OP wants to remove the cyan background from an image like this:

DeviantArt-18-cyan.png


Alfred online2long.gif
Affinity Designer/Photo/Publisher for Windows • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.8.4.186 • Designer for iPad 1.8.4.4 • iPadOS 13.7 (iPad Air 2)

Share this post


Link to post
Share on other sites
15 minutes ago, αℓƒяє∂ said:

I read it as the latter:

Then Carl123's method would be perfect.


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo & Publisher - Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

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

Share this post


Link to post
Share on other sites

With the pixel layer selected...

1) Select Sampled Color... so that the background color is selected. Click the Apply button.

2) Invert Selection. Everything BUT the background color is selected.

3) In the Channels panel, right click the Pixel selection and choose Create Spare Channel.

4) Right click on the thumbnail of the newly created Spare Channel. Choose Load to Pixel Alpha.

This should make the background color transparent.

Share this post


Link to post
Share on other sites

owenr... I’m sure that your solution would work. Actually another straightforward way to get the VISUAL results would be to use a mask. BUT, the OP wanted to move the background into the Alpha channel. Hence, my answer.

Share this post


Link to post
Share on other sites
3 hours ago, smadell said:

the OP wanted to move the background into the Alpha channel

On a re-read, I think the OP’s reference to “Colors/Color to Alpha” was just GIMP-speak for “make the selected color transparent”, with no need to move anything explicitly into the Alpha channel.


Alfred online2long.gif
Affinity Designer/Photo/Publisher for Windows • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.8.4.186 • Designer for iPad 1.8.4.4 • iPadOS 13.7 (iPad Air 2)

Share this post


Link to post
Share on other sites

0) rasterize

5 hours ago, owenr said:

1) Select Sampled Color... so that the background color is selected. Click the Apply button. 

2) Delete

3)B&W adjustment

Both work great,though

Share this post


Link to post
Share on other sites
1 hour ago, owenr said:

Anyway, your method (and my simplification of it) does not solve the problem where pixels contain a blend of foreground and background colour.

 

Just now, owenr said:

That doesn't solve the problem of fringing in the pixels that contained a blend of foreground and background colour.  

You are right: Gimp's Color to Alpha function 'unmultiplies' (for a lack of better wording) the selected colour, just like Affinity Photo's "Erase White Paper" function. Other applications have similar functions: Krita's "Color to Alpha", PhotoLine's "Color to Transparency", and the old PS "Unmultiply" plugin from Ayato come to mind. Photoshop never had a native option built-in, oddly enough.

Another classic PS plugin was "Peel Off White", but just like Ayato's Unmultiply plugin both developers decided it was too much of a bother to keep up with Adobe's ever changing plugin architecture, and decided to call it a day. Ayato re-created his filter in FilterForge, while the POW plugin creator decided to create a separate paid-for utility called "Peeler".

Reference and interesting discussion regarding this technique and alternatives: https://forums.adobe.com/thread/2067336

Anyway, it's nice that Affinity Photo offers a similar option, although a bit of a shame that it will only work with white (and black when the image is inverted first) backgrounds. I either use Krita or PhotoLine for this job. Krita is pretty good and free, while PhotoLine's Color to Transparency filter has the most options and is entirely non-destructive (can be stacked if necessary).

Gimp's version doesn't always yield good results" more control is needed. Krita is a good free option, and does a very good job and includes a threshold slider.

I hope the Photo devs will introduce more control options at some point. It's handy to have "Erase White Paper", but sort-of limited. Although I understand that most users probably just need to erase the white from existing clip art, it would be nice if a colour picker and threshold slider is added.

While we wait and hope for this, if you do need to unmultiply any coloured background from an image, just open it in Krita and use its Color to Alpha option.

Share this post


Link to post
Share on other sites

Took above image with cyan bg to fiddle;

Take-1:Rasterize>Select sampled color>apply>delete>B&W adjustment>Rasterize 
Take-2:Rasterize>B&W adjustment>Rasterize/Merge>Filters Erase White Paper

Indeed to much fringing on Take-1 version(tough second image in this post ? (had me fooled a minute)
It didn't show in APhoto ,but here in the viewer it does

Take-2.png.a0f974964302c65e41c37bb0f6203acf.png

 

Take-1.png

Share this post


Link to post
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...

×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. 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.