It is currently Sat Jul 06, 2024 7:05 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Remove white background but keep white inner
PostPosted: Wed Mar 17, 2021 8:51 pm  (#1) 
Offline
GimpChat Member

Joined: Mar 14, 2021
Posts: 5
GIMP Version: 2.8.22
Operating System: Windows
OS Version: 10
GIMP Experience: New User



Hi. I'm trying to remove the white background around this logo to leave a transparent background, but leave the white inner, so I'm just left with the wavy lined "badge" which is green and white - if that makes sense.

I've tried things like Tools > Selection Tools > By Color Select, and Colors > Color to Alpha... (and then deleting the white), but I can't see how to "deselect" the inner white parts that I want to keep. Is there a way to do this without manually tracing around the shape?

Thanks!


Attachments:
logo.png
logo.png [ 92.82 KiB | Viewed 7785 times ]
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Remove white background but keep white inner
PostPosted: Wed Mar 17, 2021 9:18 pm  (#2) 
Offline
Global Moderator
User avatar

Joined: Oct 02, 2014
Posts: 4518
Location: Sydney Australia
Firstly ensure that the target layer has an Alpha Chanel; if not right click on the layer and select Add Alpha Chanel. Then I would just use the Fuzzy Select Tool and click on the white background you want to delete. Then grow that selection by 1 pixel and either clear it by pressing the Delete key or uses Colors>Colors To Alpha with the default white parameter. In either case you should end up with the green and white badge on a transparent background.

_________________
Image

Respect should be offered freely but hard earned


Top
 Post subject: Re: Remove white background but keep white inner
PostPosted: Wed Mar 17, 2021 9:35 pm  (#3) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7746
Location: On the other side of this screen
OMG has got it! Don't use the colour by select :colsel Use this tool :fuzzsel

_________________


Top
 Post subject: Re: Remove white background but keep white inner
PostPosted: Thu Mar 18, 2021 5:20 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jun 02, 2013
Posts: 2075
If the green is solid on the edges, an easy way to do it is select> by color on the green, then select>invert selection, then use the erase tool to erase outside the green, leaving the white on the inside.

_________________
Image


Top
 Post subject: Re: Remove white background but keep white inner
PostPosted: Thu Mar 18, 2021 6:48 am  (#5) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2439
Another way, removing the need to shrink a selection, which removes the anti-aliased border pixels and leaves 'jaggies'.

Quote:
I've tried things like Tools > Selection Tools > By Color Select, and Colors > Color to Alpha... (and then deleting the white),


Remove all the white then paint it back in ;)

Use color-to-alpha (c2A) to remove all the white.
Paint the white center back in (carefully) using the brush tool in 'behind' mode.

Comparison of fuzzy-select + grow selection and C2A 1 minute animation (Gimp 2.8) https://i.imgur.com/GHA8fS1.mp4

Edit: If you have lots of these to process and the 'hands-on' approach is time-consuming then there is a plugin that can help ofn-erase-background.py
http://sourceforge.net/projects/gimp-to ... s/scripts/ down the list ofn-erase-background.zip dated 2018-03-31.

That will keep that anti-aliasing.

Attachment:
erase.jpg
erase.jpg [ 61.29 KiB | Viewed 7710 times ]

_________________
Image


Top
 Post subject: Re: Remove white background but keep white inner
PostPosted: Thu Mar 18, 2021 2:03 pm  (#6) 
Offline
Global Moderator
User avatar

Joined: Oct 02, 2014
Posts: 4518
Location: Sydney Australia
Rich2005 - thanks for pointing out the 'jaggy' remnant issue with using the fuzzy select/clear approach, especially compared with 'Color to Alpha' solution. Thanks also for pointing out the use of a brush in 'Behind' mode ... never knew of that or its 'Mode' companion 'Color erase'. These are obviously both very useful tools.

_________________
Image

Respect should be offered freely but hard earned


Top
 Post subject: Re: Remove white background but keep white inner
PostPosted: Sat Mar 20, 2021 5:34 am  (#7) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
oldmangrumpy wrote:
Rich2005 - thanks for pointing out the 'jaggy' remnant issue with using the fuzzy select/clear approach, especially compared with 'Color to Alpha' solution. Thanks also for pointing out the use of a brush in 'Behind' mode ... never knew of that or its 'Mode' companion 'Color erase'. These are obviously both very useful tools.


https://www.gimp-forum.net/Thread-Backg ... r-graphics

_________________
Image


Top
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Use of Fuzzy Select tool to remove white background from black text

2

No new posts Attachment(s) I can't use white

3

No new posts Attachment(s) anybody have a white chrome looking emap?

5

No new posts white lines lion

5

No new posts Bucket fill white comes out as grey

4



* Login  



Powered by phpBB3 © phpBB Group