Re: [Gimp-user] gradient-blur

2004-05-14 Thread William Skaggs

Nem W Schlecht wrote:
> Any update on this, Bill?

Thanks for the reminder.  Okay, I have uploaded the code to the
Gimp Plug-In Registry, at:

http://registry.gimp.org/plugin?id=4169

You should have a working gimptool-2.0 in order to install it.

Best,
  -- Bill
 

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


 
   
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-24 Thread Przemyslaw Gawronski
> http://gug.sunsite.dk/pictures/1080149573.png

This is looking really great !!!

Hope to play with it soon.

Thanks

-- 
Przemek Gawronski   gawronskip#at#wp#dot#pl
Linux Registered User 239544UIN:8358522
http://counter.li.org/
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-24 Thread Jakub Steiner
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.

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-24 Thread William Skaggs
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


 
   
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-22 Thread Jakub Steiner
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

-- 
Jakub Steiner <[EMAIL PROTECTED]>

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-22 Thread 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.  

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


 
   
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-22 Thread Jakub Steiner
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 <[EMAIL PROTECTED]>

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-22 Thread William Skaggs
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


 
   
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-22 Thread William Skaggs
>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


 
   
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-21 Thread Joao S. O. Bueno
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
-><-

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-20 Thread Steve Stavropoulos
On 20 Mar 2004, Sven Neumann wrote:

> "William Skaggs" <[EMAIL PROTECTED]> 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.
> 

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-20 Thread Sven Neumann
Hi,

"William Skaggs" <[EMAIL PROTECTED]> 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
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-20 Thread William Skaggs
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


 
   
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-19 Thread Joao S. O. Bueno
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, [EMAIL PROTECTED]
 > 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:[EMAIL PROTECTED]
 > > > Sent: 16 November 2003 14:11
 > > > To: [EMAIL PROTECTED]
 > > > 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
 > > > -><-
#!/usr/bin/env python

from gimpfu import *
from math import floor

def grad_pixelize (img, drawable, left_ammount,
 right_ammount,
divisions):

width=pdb.gimp_image_width (img)
 height=pdb.gimp_image_height (img)

 slice_width=floor(float(width)/divisions)+1


slice_pixelize=float(right_ammount-left_ammount)/divisions

for i in xrange (divisions):
#change here for a call to blur.
pdb.gimp_rect_select (img,floor 
 (i*slice_width),
0,slice_width, height,
 2,0,0)
 pdb.plug_in_pixelize (img, drawable,
 left_ammount+i*slice_pixelize)
 
register(
 "grad_pixelize",
 "Horizontal Gradient Pixelizer",
"Horizontal Gradient Pixelizer - honest",
 "Joao S. O. Bueno",
 "(k) All rites reversed - JS",
 "2003",
 "/Python-Fu/Alchemy/Gradient Pixelize",
 "*",
 [
 (PF_INT, "left_ammount", "ammount to pixelize at left", 1),
 (PF_INT, "right_ammount",
 "ammount to pixelize at right", 10),
 (PF_INT, "divisions", "how many divisions on the image", 10),
 
 ],
 [],
 grad_pixelize)

main()

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] gradient-blur

2004-03-19 Thread Jakub Steiner
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

-- 
Jakub Steiner <[EMAIL PROTECTED]>

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


RE: [Gimp-user] gradient-blur

2004-03-19 Thread craniac
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  
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user