Post Reply 

python-fu: apply effect only on selected areas.

May 27, 2011, 18:03
Post: #1
python-fu: apply effect only on selected areas.
hi,

now i'm getting into python-fu.

I want to "soft blur" just a part of an image using a python script.

In GIMP, i usually create a layer with a gradient, then select alpha values and use that selection to blur some parts of an other layer.

in python-fu there I could just find the plug_in_gauss(), that works on a whole layer or image. but how can i use that effect only on that selection?

thanks for hints!
Find all posts by this user
Quote this message in a reply
May 27, 2011, 20:58 (This post was last modified: May 27, 2011 21:01 by ofnuts.)
Post: #2
RE: python-fu: apply effect only on selected areas.
All paint and transformation methods will apply only to the intersection of layer/selection, except a few, duly noted, such as gimp_drawable_set_pixel. The same is true of filters, if they work that way manually (and gaussian blur does).

Note that applying a gaussian blur to a selection mask or feathering the selection is the same thing (see the help for the selection feathering).

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
May 28, 2011, 22:12
Post: #3
RE: python-fu: apply effect only on selected areas.
ah ok! good to know.

another question... is there a possibility to add a description to the applications window?
in the window there is the title "video blurrer" but no description on how to use it.
I know, i can type the description into the register part, but it is not shown up properly.
i thought, there might be a field like PF_DESCRIPTION (non interactive) but i didnt find something like that. so do you have a hint for me?
i want to get my script more userfriendly.
regards!
Find all posts by this user
Quote this message in a reply
May 28, 2011, 22:34
Post: #4
RE: python-fu: apply effect only on selected areas.
AFAIK the description in the register bit shows up in the PDB browser, but your average user will never look there.

IMHO the best way to make a script user friendly is to use meaningful names in the input parameters, and make them behave in a human-friendly way (for instance, instead of 3 "precision" parameters, each fed to a specific API, a general "quality" parameter from which adequate values for the other three are computed).

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Loading PythonFu Plugin: ImportError for .../python/gimp.so (GIMP 2.8.22/OSX/Py2.7.9) joroek 1 260 Jul 11, 2017 07:26
Last Post: ythgilb
  Setting text markup from python script Burbly 1 393 Sep 16, 2014 12:29
Last Post: Burbly
  Python-Fu Script Not Registering image_artist 1 356 Sep 14, 2014 13:24
Last Post: image_artist
  Bashing my head - Batch Python Script nmiltner 1 414 Sep 5, 2014 00:58
Last Post: nmiltner
  Help with python script and drawables nmiltner 3 465 Aug 28, 2014 16:09
Last Post: nmiltner

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS