RSS/Atom feed Twitter
Site is read-only, email is disabled

gradient-blur

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

16 of 16 messages available
Toggle history

Please log in to manage your subscriptions.

gradient-blur Przemyslaw Gawronski 19 Mar 11:04
  gradient-blur Jakub Steiner 19 Mar 17:14
gradient-blur craniac 19 Mar 11:36
  gradient-blur Joao S. O. Bueno 19 Mar 15:20
gradient-blur William Skaggs 20 Mar 18:38
  gradient-blur Sven Neumann 20 Mar 22:04
   gradient-blur Steve Stavropoulos 20 Mar 23:15
  gradient-blur Joao S. O. Bueno 22 Mar 06:18
gradient-blur William Skaggs 22 Mar 18:12
  gradient-blur Jakub Steiner 23 Mar 01:25
gradient-blur William Skaggs 22 Mar 18:45
gradient-blur William Skaggs 22 Mar 20:38
  gradient-blur Jakub Steiner 23 Mar 05:18
gradient-blur William Skaggs 24 Mar 18:47
  gradient-blur Jakub Steiner 25 Mar 02:08
  gradient-blur Przemyslaw Gawronski 25 Mar 08:31
Przemyslaw Gawronski
2004-03-19 11:04:41 UTC (about 20 years ago)

gradient-blur

Hi Gimpers

I'm looking for tool that would give me a blur efect but with a gradient intencity. That is at the begining I would have a sharp pic but gradualy get more blured and more and more ... (going from left to right for example).

I would be thankful for sugestions on how I can do that in Gimp (2.0 pre4 ofcource).

Thanks

Przemek

craniac
2004-03-19 11:36:05 UTC (about 20 years ago)

gradient-blur

Przemyslaw Gawronski wrote:

I'm looking for tool that would give me a blur efect but with a gradient intencity. That is at the begining I would have a sharp pic but gradualy get more blured and more and more ... (going from left to right for example).

Make a copy of the layer you want to blur. Blur the copied layer and add a layer mask to it. Then fill the layer mask with a black to white gradient. --
Steve Crane
http://craniac.afraid.org

Joao S. O. Bueno
2004-03-19 15:20:42 UTC (about 20 years ago)

gradient-blur

On Friday 19 March 2004 07:36, craniac wrote:

Przemyslaw Gawronski wrote:

I'm looking for tool that would give me a blur efect but with a gradient intencity. That is at the begining I would have a sharp pic but gradualy get more blured and more and more ... (going from left to right for example).

Make a copy of the layer you want to blur. Blur the copied layer and add a layer mask to it. Then fill the layer mask with a black to white gradient.

That might not have the desired effect. It ' s a 4 liner scripfu -or python -fu that would slice the image in rectangular selections and run the filter variably on these rectangles what he is needing.

I made such a filter in python fu once, and I'd paste it here, if I had it. I did it with the pixelize filter, all one have to do is to change the filter used.

It is in the script-fu list in yahoo.com archives, however. - The person taht was needing it did not had pythofu working, so I posted it there for someone to translate it into scriptfu (I have too many things to do rather than trying to figure Scheme out)
/me googles for "gwidion script pixelize gradient" and clicks on first result.
/me pastes result here.

(I will remove the ">>" from the scripts for them to work., If you settle for the python one, beware of the spacing.
On Monday 17 November 2003 06:12, gd32@b... > wrote:
> > Here you are. Tested under gimp 1.3.22 (windows) > >
> > Guillaume
> >
> >
> >
(define (script-fu-grad-pixelize img drawable left-ammount
right-ammount divisions)
(define (floor x) (- x (fmod x 1))) ;there is no floor function in script-fu !
(let*
(
(width (car (gimp-image-width img))) (height (car (gimp-image-height img))) (slice-width (floor (+ (/ width divisions) 1)))
(slice-pixelize (/ (- right-ammount left-ammount)
divisions))
(i 0)
) ;end declarations
(while (< i divisions)
(gimp-rect-select img (floor (* i slice-width)) 0
slice-width height 2 0 0)
(plug-in-pixelize RUN-NONINTERACTIVE img drawable (+
left-ammount (* i slice-pixelize))) (set! i (+ i 1))
) ;end while
) ;end let
(gimp-displays-flush)
) ;end define

(script-fu-register "script-fu-grad-pixelize"
"/Script-Fu/Alchemy/Gradient
Pixelize"
"Horizontal Gradient Pixelizer"
"Joao S. O. Bueno, Guilhaume"
"(k) All rites reversed - JS"
"2003"
"*"
SF-IMAGE "img" 0
SF-DRAWABLE "drw" 0
SF-VALUE "ammount to pixelize at left" "1"
SF-VALUE "ammount to pixelize at right" "10"
SF-VALUE "how many divisions on the image" "10"
)

> > > -----Original Message-----
> > > From: Joao S. O. Bueno
> [mailto:gwidion@mpc.com.br]
> > > Sent: 16 November 2003 14:11
> > > To: script-fu@yahoogroups.com > > > Subject: [script-fu] Help writting in Scheme... > > >
> > >
> > > Hi there,
> > >
> > > A friend of mine wanted to apply a filter (pixelize), with valuer > > > varying from the image left to its right. > > >
> > > I quicly wrote him a python-fu script to that. But it is in > > > python, and he had some problem configuring gimp-python. > > >
> > > I simply an not able to learn this scheme native scripting... > > >
> > > :-) So, I will paste my python script here, and ask if > > >
> > > someone could be kind enough to re-write it in scheme. > > >
> > > Thanks in advance.
> > >
> > > JS
> > > ->, 10),

],
[],
grad_pixelize)

main()

Jakub Steiner
2004-03-19 17:14:26 UTC (about 20 years ago)

gradient-blur

On Fri, 2004-03-19 at 11:04 +0100, Przemyslaw Gawronski wrote:

Hi Gimpers

I'm looking for tool that would give me a blur efect but with a gradient intencity. That is at the begining I would have a sharp pic but gradualy get more blured and more and more ... (going from left to right for example).

I would be thankful for sugestions on how I can do that in Gimp (2.0 pre4 ofcource).

Just create an appropriate selection for the blur filter. The fastest method in this case would be toggling the quickmask, creating the gradient, toggling back and applying the blur filter.

cheers

William Skaggs
2004-03-20 18:38:30 UTC (about 20 years ago)

gradient-blur

Actually the reality is that Gimp, with the standard plug-ins, does not have the ability to do this, although there are ways to fake something that looks sort of like it. The easiest way to get it would be to modify the "blur" filter (found in randomize.c in the plug-ins directory) so that the probability values are derived from a map-image rather than constant. This would really be a valuable thing to have.

Best, -- Bill


______________ ______________ ______________ ______________ Sent via the KillerWebMail system at primate.ucdavis.edu

Sven Neumann
2004-03-20 22:04:34 UTC (about 20 years ago)

gradient-blur

Hi,

"William Skaggs" writes:

Actually the reality is that Gimp, with the standard plug-ins, does not have the ability to do this, although there are ways to fake something that looks sort of like it. The easiest way to get it would be to modify the "blur" filter (found in randomize.c in the plug-ins directory) so that the probability values are derived from a map-image rather than constant. This would really be a valuable thing to have.

Combining a blurred picture with an unblurred picture using layer mask seems to work well for me. Of course it's not the same but it should look reasonably similar.

Sven

Steve Stavropoulos
2004-03-20 23:15:32 UTC (about 20 years ago)

gradient-blur

On 20 Mar 2004, Sven Neumann wrote:

"William Skaggs" writes:

Actually the reality is that Gimp, with the standard plug-ins, does not have the ability to do this, although there are ways to fake something that looks sort of like it. The easiest way to get it would be to modify the "blur" filter (found in randomize.c in the plug-ins directory) so that the probability values are derived from a map-image rather than constant. This would really be a valuable thing to have.

Combining a blurred picture with an unblurred picture using layer mask seems to work well for me. Of course it's not the same but it should look reasonably similar.

What is the best technique? What you suggest or the one that follows? Are there any problems with these two ways, compared with the "mod of the blur filter" way?

On Fri, 19 Mar 2004, Jakub Steiner wrote:

Just create an appropriate selection for the blur filter. The fastest method in this case would be toggling the quickmask, creating the gradient, toggling back and applying the blur filter.

Joao S. O. Bueno
2004-03-22 06:18:47 UTC (about 20 years ago)

gradient-blur

On Saturday 20 March 2004 14:38, William Skaggs wrote:

Actually the reality is that Gimp, with the standard plug-ins, does not have the ability to do this, although there are ways to fake something that looks sort of like it. The easiest way to get it would be to modify the "blur" filter (found in randomize.c in the plug-ins directory) so that the probability values are derived from a map-image rather than constant. This would really be a valuable thing to have.

Best,
-- Bill

I had thought about this.
What I found out is that tit will be easy to modify the "filter all layers" GAP filter to to right that: Add a "select map image" widget, and a "value step" choice.

On the map image, make a selection by value range. For each value range apply the filter on the target image, with the obtained selection.

I will try to work on that.

Meanwhile, the scripts I posted on the other message can work for applying a single filter with a linear variation across a image.

Regards, JS
->

William Skaggs
2004-03-22 18:12:36 UTC (about 20 years ago)

gradient-blur

On 20 Mar 2004, Sven Neumann wrote:

Combining a blurred picture with an unblurred picture using layer mask seems to work well for me. Of course it's not the same but it should look reasonably similar.

On Fri, 19 Mar 2004, Jakub Steiner wrote:

Just create an appropriate selection for the blur filter. The fastest method in this case would be toggling the quickmask, creating the gradient, toggling back and applying the blur filter.

What is the best technique? What you suggest or the one that follows? Are there any problems with these two ways, compared with the "mod of the blur filter" way?

Neither of these techniques work, as you will see if you try to apply them. When you mix a blurred image with a sharp image, the result does not look like a less-blurred image, it looks like a sharp image whose contrast has been reduced.

Best, -- Bill


______________ ______________ ______________ ______________ Sent via the KillerWebMail system at primate.ucdavis.edu

William Skaggs
2004-03-22 18:45:44 UTC (about 20 years ago)

gradient-blur

Yes, these should work, although there are a couple of things worth pointing out. First, the blur filters ignore the selection when computing their result, and only apply it afterwards -- this makes your approach work, but means that it can take a very long time if the slicing is fine. Second, if the filter does not ignore the selection, your approach might not give the right results.

From a mathematical point of view, a variable blur is a rather special thing, and

I think in the long run there is no substitute for just biting the bullet and doing it correctly. But your approach is definitely better than the others that have been suggested.

Best,
--- Bill

I had thought about this.
What I found out is that tit will be easy to modify the "filter all layers" GAP filter to to right that: Add a "select map image" widget, and a "value step" choice.

On the map image, make a selection by value range. For each value range apply the filter on the target image, with the obtained selection.

I will try to work on that.

Meanwhile, the scripts I posted on the other message can work for applying a single filter with a linear variation across a image.

Regards, JS
->

______________ ______________ ______________ ______________ Sent via the KillerWebMail system at primate.ucdavis.edu

William Skaggs
2004-03-22 20:38:38 UTC (about 20 years ago)

gradient-blur

Uh? It works pretty well I'd say: http://jimmac.musichall.cz/stuff/linearblur.png

To my eyes this image looks sharp in the lower 2/3, and uniformly blurred in the upper 1/3. What you _do_ get using this method is a nice smooth transition from blurred to unblurred, which may be all you need in many situations, especially if the blur is rather soft.

I note also that you are using a bit of a trick here: the line of the eyes creates a boundary in the image that makes it very difficult to perceive gradations of blurriness at about the same level.

Best, -- Bill


______________ ______________ ______________ ______________ Sent via the KillerWebMail system at primate.ucdavis.edu

Jakub Steiner
2004-03-23 01:25:21 UTC (about 20 years ago)

gradient-blur

On Po, 2004-03-22 at 09:12 -0800, William Skaggs wrote:

Neither of these techniques work, as you will see if you try to apply them. When you mix a blurred image with a sharp image, the result does not look like a less-blurred image, it looks like a sharp image whose contrast has been reduced.

Uh? It works pretty well I'd say: http://jimmac.musichall.cz/stuff/linearblur.png

Jakub Steiner
2004-03-23 05:18:57 UTC (about 20 years ago)

gradient-blur

V Po 22. 03. 2004 v 11:38 -0800 píše William Skaggs:

Uh? It works pretty well I'd say: http://jimmac.musichall.cz/stuff/linearblur.png

To my eyes this image looks sharp in the lower 2/3, and uniformly blurred in the upper 1/3. What you _do_ get using this method is a nice smooth transition from blurred to unblurred, which may be all you need in many situations, especially if the blur is rather soft.

Didn't occur to me prior this, but you are in fact right.

Another workaround of this limitation than the GAP method may be using a huge soft parametric brush so that it's as high as the image height and paint a few lines on the top egde (so a half of the brush covers the image) using the blur tool. One needs to zoom out a bit to get a bit of space on the image border.

cheers

William Skaggs
2004-03-24 18:47:00 UTC (about 20 years ago)

gradient-blur

For what it's worth, I went ahead and implemented a true variable blur filter, by modifying the "blur" plug-in code from 2.0. I'll put the code in the plug-in registry after a little bug-fixing, but anyway, I put together a comparison of what you get with variable blurring versus what you get with variable blending of blurred and sharp images -- you can see it at:

http://gug.sunsite.dk/pictures/1080149573.png

Please note that I am not saying that one is better than the other, just that they are different.

Best,
-- Bill


______________ ______________ ______________ ______________ Sent via the KillerWebMail system at primate.ucdavis.edu

Jakub Steiner
2004-03-25 02:08:26 UTC (about 20 years ago)

gradient-blur

On St, 2004-03-24 at 09:47 -0800, William Skaggs wrote:

For what it's worth, I went ahead and implemented a true variable blur filter,

That's the spirit! Looking forward to it.

cheers

-- even a stopped clock gives a right time twice a day.

Przemyslaw Gawronski
2004-03-25 08:31:05 UTC (about 20 years ago)

gradient-blur

http://gug.sunsite.dk/pictures/1080149573.png

This is looking really great !!!

Hope to play with it soon.

Thanks