It is currently Thu Apr 25, 2024 12:49 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: very aliased grow/shrink selection
PostPosted: Fri Jul 03, 2015 9:51 am  (#1) 
Offline
GimpChat Member

Joined: Apr 29, 2012
Posts: 110
GIMP Version: 2.8.14
Operating System: Windows
GIMP Experience: New User



Something that has always bothered me with gimp is how when i select something , then use the grow or shrink selection, what is resulting is an horribly aliased selection, by example :

I have an antialiased colored thing, i use the "Select by color" tool, i make sure "Antialiased" is enabled in the tool.

Then i Select -> Grow for some pixels.

While in other image editor i have used , the result would still be antialiased, in Gimp the resulting selection has completely lost the antialiasing of the original selection, in case i explain badly i fill the result with a blue color so you can see how very bad it is :
Image

Gimp has a supposed Filter-> Enhance -> Antialias but it simply does nothing in this case.

That's just a pain when you have more difficult cases to deal with than just the example i posted, so there must be a way i am unaware about. I know photoshop does not have that problem as if your original selection is antialiased, your expansion of such selection keep the antialiasing, but in Gimp not at all from what i see.

The only workaround i found was to fill the resulting selection with a color, then reselect that color with the color tool with feather edge selected while being set to a very low value, then refill that color with the same color a dozen of time, and the final result looks antialiased, but very very unprecise.

Basically it's just a pain.
So how do you avoid this very ugly problem when you just want/need to grow/shrink a selection ?


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: very aliased grow/shrink selection
PostPosted: Fri Jul 03, 2015 10:15 am  (#2) 
Offline
GimpChat Member

Joined: Apr 29, 2012
Posts: 110
Was looking on google for a while, and typical as soon as i post because i can't find it myself ... i just find it on google :
http://gimpforums.com/thread-a-method-f ... on-borders

Works greatly, i wish there was an antialias option for the grow/shrink to cut on the workaround


Top
 Post subject: Re: very aliased grow/shrink selection
PostPosted: Fri Jul 03, 2015 10:25 am  (#3) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
Another way is to anti-alias the original selection. Select>To Path followed by Select>From path seems to do the job.

_________________
Image


Top
 Post subject: Re: very aliased grow/shrink selection
PostPosted: Fri Jul 03, 2015 10:28 am  (#4) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7713
Location: On the other side of this screen
Do you still have the xcf? I would have tried to gaussian blur the different colours

_________________


Top
 Post subject: Re: very aliased grow/shrink selection
PostPosted: Fri Jul 03, 2015 11:24 am  (#5) 
Offline
GimpChat Member

Joined: Apr 29, 2012
Posts: 110
the gaussian blur trick is a part of the method i linked to, but gaussian blur alone will not fix the whole problem as it will still display a noticable blur in many case instead of a seemingly nicely sharp transition, you'll need to "sharpen" the blured color after that, as mentionned in the tutorial linked by using a brightness/contrast trick.

I didn't tried the path method yet, as the linked tutorial has worked perfectly for my needs , but i will have to test if the path method can cut on the time spent in this workaround.

Thanks for the replies.


Top
 Post subject: Re: very aliased grow/shrink selection
PostPosted: Fri Jul 03, 2015 1:20 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Feb 21, 2015
Posts: 22
You could probably also feather the selection by a few pixels


Top
 Post subject: Re: very aliased grow/shrink selection
PostPosted: Fri Jul 03, 2015 4:39 pm  (#7) 
Offline
GimpChat Member

Joined: Apr 29, 2012
Posts: 110
I had tried the feathering, it unfortunately isn't doing a satisfying result, very far from what you would want to have with antialiasing, so far the technique from the linked tutorial is the closest to having a real antialiased grow/shrink, it's just more steps.


Top
 Post subject: Re: very aliased grow/shrink selection
PostPosted: Sat Jul 04, 2015 9:37 am  (#8) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
ofnuts wrote:
Another way is to anti-alias the original selection. Select>To Path followed by Select>From path seems to do the job.

I just had to try this for myself.
Yet another reason to love paths.

_________________
TinT


Top
 Post subject: Re: very aliased grow/shrink selection
PostPosted: Sat Jul 04, 2015 3:40 pm  (#9) 
Offline
GimpChat Member

Joined: Apr 29, 2012
Posts: 110
Got some time to test the path method, and it works splendidly, and it's less step than the motion blur+contrastbrigthness+colortoalpha trick.

Only oddity is that before doing a Select -> Selection to Path after enabling the path tool, i need to click once on the canvas to make the 1st path control point to appear, if i do not do that Select -> Selection to Path does nothing.

But anyways, it's faster that the other method and works as well.
Thanks


Top
 Post subject: Re: very aliased grow/shrink selection
PostPosted: Sat Jul 04, 2015 4:10 pm  (#10) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
Brogun wrote:
Only oddity is that before doing a Select -> Selection to Path after enabling the path tool, i need to click once on the canvas to make the 1st path control point to appear, if i do not do that Select -> Selection to Path does nothing.

You don't need (or want) to "enable the path tool" before doing Select > To path


Top
 Post subject: Re: very aliased grow/shrink selection
PostPosted: Sat Jul 04, 2015 5:22 pm  (#11) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
I just select the right click the created path and select Path To Selection (I think it does the same).

_________________
TinT


Top
 Post subject: Re: very aliased grow/shrink selection
PostPosted: Sun Jul 05, 2015 3:00 am  (#12) 
Online
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
You could try applying Color Curves to the alpha channel, after blurring to adjust the antialiasing.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Shrink Grow Feather Selection with LIVE PREVIEW

43

No new posts Attachment(s) Use Shrink or Grow by 1 pixel on command

12

No new posts Alpha to Selection Help

1

No new posts Attachment(s) alpha to selection

2

No new posts Can't Alpha to Selection

5



* Login  



Powered by phpBB3 © phpBB Group