It is currently Thu Apr 25, 2024 2:44 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Rounded Selection
PostPosted: Tue May 20, 2014 9:04 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 15, 2013
Posts: 133
Hi,
Was searching for a script to round the corners of a selection. I found this via google. Apparently, this used to be in the core, but it's no longer there. I did find a script that is supposed to do the same thing, but it's old and doesn't work with 2.8.

Could someone please update this script, or point me to another solution? I would be most grateful.


Attachments:
selection-rounded-selection.scm [7.74 KiB]
Downloaded 143 times

_________________
Gimp 2.8.16
Arch Linux - XFCE 4.12
Some of my work.
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: Rounded Selection
PostPosted: Tue May 20, 2014 9:42 am  (#2) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
It can now be found in the menus as "Select->Rounded Rectangle..."

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 9:43 am  (#3) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
It doesn't work in 2.6 either, but it was easy to fix - just add one line.

However, don't try and set a radius of 80 or above as it will crash.

Kevin

and as I was :ninja by saulgoode - do what he says :bigthup


Attachments:
selection-rounded-selection.scm [7.83 KiB]
Downloaded 126 times
Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 9:51 am  (#4) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Well, I may have spoken too soon. The Rounded Rectangle script in the Selection menu does not work with complexly shaped selections (or rather, it treats them as a rectangle). If the goal is to round all of the corners of a selection (as shown in the cited tutorial) then Kevin's updated version of the script should be used.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 9:54 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 15, 2013
Posts: 133
saulgoode wrote:
It can now be found in the menus as "Select->Rounded Rectangle..."


Tried that but not giving expected results. I want to select some text (alpha to selection), and then just round the hard edges a certain amount. Rounded rectangle make one big rectangle selection with the four corners rounded.


paynekj wrote:
It doesn't work in 2.6 either, but it was easy to fix - just add one line.

However, don't try and set a radius of 80 or above as it will crash.

Kevin


Tried the script but get an error.
  Rounded Selection Warning
Error while executing script-fu-selection-rounded-selection:

Error: ( : 1) cdr: argument 1 must be: pair


Thanks,
ako

_________________
Gimp 2.8.16
Arch Linux - XFCE 4.12
Some of my work.


Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 10:14 am  (#6) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
Try, Alpha to selection, Select | Grow selection.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 10:22 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 15, 2013
Posts: 133
Odinbc wrote:
Try, Alpha to selection, grow selection.


I tried the little trick mentioned in the tutorial I linked by shrinking and growing, and though it kinda works, I was looking for something more exact without the trial and error. This script might not work as I expect, but I'm hoping it does.

I really wish there was an easy way to just add rounded corners on a path. I realize this could probably be achieved using the advanced options for selection to path, but I gave up on that long ago. Trying to figure out all the options is harder than Chinese arithmetic. :gaah

_________________
Gimp 2.8.16
Arch Linux - XFCE 4.12
Some of my work.


Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 10:33 am  (#8) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7714
Location: On the other side of this screen
Also selection border you should get rounded edges...providing the selection isn't too small
Image

_________________


Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 10:38 am  (#9) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
akovia wrote:
Tried the script but get an error.
  Rounded Selection Warning
Error while executing script-fu-selection-rounded-selection:

Error: ( : 1) cdr: argument 1 must be: pair



What value of radius did you select? as that's exactly the error I got when I set the radius to 80. It seems to work for me:
Attachment:
Untitled.png
Untitled.png [ 9.82 KiB | Viewed 3122 times ]


Kevin


Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 10:49 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
depending of what you want to do, you can get a rectangle with rounded corners with the Shape Paths script

viewtopic.php?f=12&t=6992


Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 10:52 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jan 15, 2013
Posts: 133
paynekj wrote:
What value of radius did you select? as that's exactly the error I got when I set the radius to 80. It seems to work for me:
Kevin


I was using 4. I just tried it again using 3 and it worked fine, so I went back to 4 and now that works as well. No clue what happened.

Thanks you so much Kevin, this is exactly what I needed. :yes

_________________
Gimp 2.8.16
Arch Linux - XFCE 4.12
Some of my work.


Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 10:56 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 15, 2013
Posts: 133
Esper wrote:
depending of what you want to do, you can get a rectangle with rounded corners with the Shape Paths script

viewtopic.php?f=12&t=6992


Thanks Esper. I am familiar with that script and use it regularly, but it creates paths, where I want to take an existing path and round the hard corners by a specific amount. Rounding the selection from a path was the next best thing and the script that Kevin fixed works great now. :)

_________________
Gimp 2.8.16
Arch Linux - XFCE 4.12
Some of my work.


Top
 Post subject: Re: Rounded Selection
PostPosted: Tue May 20, 2014 3:26 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Mar 10, 2014
Posts: 845
sallyanne wrote:
Also selection border you should get rounded edges...providing the selection isn't too small
[ Image ]

thank Sallyanna I learn something new (for me)
see the test:
Image


Top
 Post subject: Re: Rounded Selection
PostPosted: Wed May 21, 2014 6:59 pm  (#14) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Rounded Selection with a few fixes
1/ works on any selection (text typically 1→20 else 1→100)
2/ If no selection exists, a selection is attempted from alpha channel if one exist,or else it's made of the entire layer size and the corners are rounded.
3/ option to clean up the layer, added as per Molly's suggestion (this also deletes selection)
4/ Menu Location is Select/Rounded Selection

Image
Arial Bold 250px Radius set to 20

Attachment:
selection-rounded-selection.scm [8.36 KiB]
Downloaded 143 times

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Last edited by Graechan on Thu May 22, 2014 1:53 am, edited 2 times in total.

Top
 Post subject: Re: Rounded Selection
PostPosted: Wed May 21, 2014 8:06 pm  (#15) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
What is it supposed to do, I ran it on a selected text and again on a non selected text.
I used 250 and a radius of 20 and it didn't do anything.
Image

font [FreeSans Semi-Bold Italic]

_________________
Image


Top
 Post subject: Re: Rounded Selection
PostPosted: Wed May 21, 2014 8:15 pm  (#16) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Molly you should have been left with a selection as well

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Rounded Selection
PostPosted: Wed May 21, 2014 8:20 pm  (#17) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
I was left with the selection, I just figured it out, I had to invert, then delete and it left the rounded corners Image

_________________
Image


Top
 Post subject: Re: Rounded Selection
PostPosted: Wed May 21, 2014 8:29 pm  (#18) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Molly even better is to add a selection mask then delete the selection and fill the text layer with text color

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Rounded Selection
PostPosted: Wed May 21, 2014 8:52 pm  (#19) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
I went through the whole thread and I didn't see anything about invert then delete to remove the corners. so there... Greachan

_________________
Image


Top
 Post subject: Re: Rounded Selection
PostPosted: Wed May 21, 2014 9:11 pm  (#20) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
molly wrote:
I went through the whole thread and I didn't see anything about invert then delete to remove the corners. so there... Greachan

Read my PM. so there....Molly

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Python rounded rectangle bucket fill problem

1

No new posts Guides from selection

2

No new posts Can't Alpha to Selection

5

No new posts Alpha to Selection Help

1

No new posts Attachment(s) alpha to selection

2



* Login  



Powered by phpBB3 © phpBB Group