It is currently Wed May 08, 2024 6:40 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 154 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next
Author Message
 Post subject: Gradient Stroke Script V1.5
PostPosted: Sun Jul 13, 2014 7:14 pm  (#1) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
From a discussion in this thread, I decided to toss together a quick stand alone script that performs a basic gradient stroke that would be easy to call from another script (or just incorporate the code directly). Since then, this script has taken on a life of its own.

Gradient Stroke V1.5 creates a gradient stroke by copying the selected layer, filling with selected gradient, shrinking (or growing) by the stroke width, then clearing the remainder of the layer. If no selection is detected, the script performs Alpha to Selection. Otherwise, the script uses the existing selection.

Setting the Stroke Depth to zero directs the script to perform a gradient fill, rather than a gradient stroke. Setting the Bump Map depth to a value greater than zero directs the script to bump map the stroke (or fill) at the specified depth.

To facilitate fast and easy multiple strokes, the script has provisions for keeping the selection: Active, Inner Edge, Outer Edge & None.

Fully compatible with GIMP 2.10.x layer, GIMP 2.8.x layer groups and GIMP 2.6.x.

Menu location: Filters/Decor/Gradient Stroke..

Image

Image

Image

Image


Attachments:
File comment: Gradient Stroke Script V1.5
gradient-stroke.scm [18.46 KiB]
Downloaded 203 times
File comment: Gradient Stroke Script V1.4
gradient-stroke.scm [18.41 KiB]
Downloaded 146 times

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill
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: problem with list
PostPosted: Sun Jul 13, 2014 7:43 pm  (#2) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
That is cool Tux, I am grabbing it too. I think a gradient stroke would have a lot of use. Thanks

_________________
Image


Top
 Post subject: Re: problem with list
PostPosted: Sun Jul 13, 2014 7:46 pm  (#3) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
molly wrote:
That is cool Tux, I am grabbing it too. I think a gradient stroke would have a lot of use. Thanks

OK, Molly. I'll tweak and test it a bit more before I make an official release. Let me know if you have any problems. I think I'll add a manual option to keep the selection, which will be handy for double stroking.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: problem with list
PostPosted: Sun Jul 13, 2014 7:59 pm  (#4) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Ok, I will try it first thing in the morning. I have my main pc off for the night so I will let you know..

_________________
Image


Top
 Post subject: Re: problem with list
PostPosted: Sun Jul 13, 2014 8:01 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
I grabbed it also. I will try to get time to see if it works good on my mcgimp tonight or tomorrow night


Top
 Post subject: Re: problem with list
PostPosted: Sun Jul 13, 2014 8:07 pm  (#6) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Ok, Let me know 2-ton. Being it's script-fu, it should work fine.

Note: The results you'll get when changing the "Blend Mode" in the script depends on the color of the initial image or text/image you're stroking. It will blend the gradient with the original text/image you're using to create the new gradient stroke layer.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: problem with list
PostPosted: Sun Jul 13, 2014 8:32 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
Works perfectly on a mac with mcgimp!
Image


Top
 Post subject: Re: problem with list
PostPosted: Sun Jul 13, 2014 9:31 pm  (#8) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
option for stroke position, scale, angle and repeat would be handy (see below↓)
from Icci layer effects
Image

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


Top
 Post subject: Re: problem with list
PostPosted: Sun Jul 13, 2014 10:04 pm  (#9) 
Offline
GimpChat Member

Joined: May 23, 2012
Posts: 150
Image

great script

Tux

thank you


Top
 Post subject: Re: problem with list
PostPosted: Sun Jul 13, 2014 10:49 pm  (#10) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Thanks Mike. It's quick and dirty. ;)

Graechan wrote:
option for stroke position, scale, angle and repeat would be handy

Not sure what angle and scale does but it looks like that script has it covered. :hehe

My thinking was to keep it simple and not have so many parms to pass when calling from another script. Here's the latest version: Beta 0.92. Feel free to add your own enhancements to this one, Graechan. :bigthup

See first post in thread.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: problem with list
PostPosted: Sun Jul 13, 2014 11:15 pm  (#11) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Ooops. Fixed a bug where the gradient wasn't being fully applied to the entire image.

New version in first post.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: problem with list
PostPosted: Mon Jul 14, 2014 12:37 am  (#12) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
GnuTux angle can be seen in the images below↓
Image
Image
next image has a different scale↓
Image

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


Top
 Post subject: Re: problem with list
PostPosted: Mon Jul 14, 2014 1:14 am  (#13) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
This script just does 8 directions of gradient fills. There are an infinite number of possible directions. It would depend on where your start and end points were: x1/y1 and x2/y2, right?.

Scaling looks like it's just increasing/decreasing the overall size of the applied gradient. Seems that would cause banding when scaling upwards. Perhaps it could be smoothed.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: problem with list
PostPosted: Mon Jul 14, 2014 2:13 am  (#14) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
In Icci's script Angle and Scale actually combine to set the x1/y1 and x2/y2 postions

      (radians (/ (* 2 *pi* angle) 360))
        (x-distance (* 0.5 scale width (sin radians)))
        (y-distance (* 0.5 scale height (cos radians)))
        (x-center (/ width 2))
        (y-center (/ height 2))
        (x1 (- x-center x-distance))
        (y1 (- y-center y-distance))
        (x2 (+ x-center x-distance))
        (y2 (+ y-center y-distance))

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


Last edited by Graechan on Mon Jul 14, 2014 2:19 am, edited 1 time in total.

Top
 Post subject: Re: Stand Alone Gradient Stroke Script
PostPosted: Mon Jul 14, 2014 2:15 am  (#15) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
OK. I'll check that out and see what techniques used there might be useful in this script.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Stand Alone Gradient Stroke Script
PostPosted: Mon Jul 14, 2014 2:44 am  (#16) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
GnuTux if the scale is set to 1.00, the script applies the gradient in the direction of the angle, e.g. the gradient is applied towards the centre from any of 360deg's

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


Top
 Post subject: Re: Stand Alone Gradient Stroke Script
PostPosted: Mon Jul 14, 2014 3:02 am  (#17) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
That sounds like a reasonable approach, one that gives the user more options via a script. Perhaps some offsets values would make the script even more versatile.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Stand Alone Gradient Stroke Script
PostPosted: Mon Jul 14, 2014 4:48 am  (#18) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Very nice results Tux, thank you.
Image

Bump Mapped stroke x2
Image

_________________
Image


Top
 Post subject: Re: Stand Alone Gradient Stroke Script
PostPosted: Mon Jul 14, 2014 3:10 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: Mar 10, 2014
Posts: 845
my exerc.
Image


Top
 Post subject: Re: Stand Alone Gradient Stroke Script
PostPosted: Mon Jul 14, 2014 3:45 pm  (#20) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I love it. Very nice. Thanks, GnuTux!

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
Post new topic Reply to topic  [ 154 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Is there a script for doing Stroke outside selection?

4

No new posts Stroke: how to remove space between test & stroke

3

No new posts Attachment(s) stroke selection/stroke path

2

No new posts Attachment(s) stroke path with pattern

26

No new posts Attachment(s) Recalling FPS (Free Paint Stroke)

79


cron

* Login  



Powered by phpBB3 © phpBB Group