4
I'm trying to use GIMP to automate 3 actions upon a user defined selection in the currently active image -
- Grow selection by 2
- Add border to selection (width of 2, with feathered edges)
- Fill the whole selection with colour #FF0000 (red)
I've discovered the Script-Fu Console
, and have browsed fo the (gimp-selection-grow image steps)
command, but I'm now kind of stuck.
Under paramaters
, the documentation simply says
image IMAGE The image
steps STEPS Steps of grow (in pixels) (steps >= 0)
Now steps
is pretty obvioius, but I'm stuck on image
. Surely with the action being carried out on a selection, the grow should be appled to the active selection?
I tried leaving image
as is, in the hopes that GIMP would realise I wanted to action the grow on the active selection, but I received the error Error: ( : 1) eval: unbound variable: image
Can anyone please help to get me started?
EDIT
I've now discovered a tutorial for adding scripts to the GIMP using Python (http://www.exp-media.com/content/extending-gimp-python-python-fu-plugins-part-2), and I have my script registered and, to some extent, working.
Pleae see my answer below.
However, one problem does remain - I'd like to make it so that my menu entry is greyed out until a selection is made, as opposed to always visible.