Jump to content

Best approach to remove background with black line drawing in foreground?


Recommended Posts

Sorry for the quote dialog, I accidentally created it and don't know how to get ride of it.

I come across this problem periodically and I"m not a professional graphic designer, just a hack who does it for fun and web design.

I have an image which I want to remove colored background from and leave the black line art without degrading the line art. My thought was to use the selection tools but thought there might be a way to prep the black line art so it is easier to cleanup around it without taking too much away from the line art, any suggestions from someone with more knowledge than I have? Attaching sample file

 

Quote

 

Untitled.png

Link to comment
Share on other sites

Hi,

 

you can use the filter and adjust the min and max values to optimize the filter criteria.

Save this PT filter as asset, or copy it into other files where you need it.

Use "Merge visible" to create a pixel layer from the filtered result.

 

The lines actually are not black at all. There have the same green hue as the background, only much darker. The formula filters based on lightness, and cuts off all outside the specified range (black too dark, light green to light).

image.thumb.png.18e44094442bfeaae87289770a692c69.png

filter L.afphoto

Edited by NotMyFault

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

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.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

 

I made an update with a "smooth" slider in case you need a kind of anti-aliasing / edge smoothing.

In Principle it is the same as using "blend ranges". The advantage is using sliders instead of fiddling with multiple nodes.

And the method could be extended to filter based on hue and / or saturation, in case luminosity is not sufficient.

 

 

L sel via blend ranges.PNG

filter L.afphoto

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

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.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

1. Add a Threshold adjustment layer to get a pure black & white image

If you want a black and transparent image, after step 1 do...

2. Rasterise the image layer

3. Filters > Colours > Erase White Paper

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

5 hours ago, carl123 said:

Add a Threshold adjustment layer to get a pure black & white image

The problem with a pure B&W image is that there are no greys for antialiasing, so the resultant lines can be quite jagged.

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)

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...
×
×
  • 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.