On 10/27/05, Jon Niehof <[EMAIL PROTECTED]> wrote:
> Haven't found anything recent in the archives regarding this--is
> it possible to access the toolbox in some way via scheme
> scripts? I want to batch-crop a bunch of images--i.e. write a
> script that'll load an image, display it, pull up the crop tool,
> and wait for the user to approve the crop. Then, once the crop
> is done, save the image, close the window, go to the next one.
IIRC, The tools simply provide a gui interface to simplified pdb
functions that can be called directly in scripts, such as
gimp_image_crop. Also, IIRC, there isn't really a good way of
prompting the user for confirmation with that kind of instance in
script functions. In addition, loading multiple images looks like
either you're using GLOB or having them "hard-coded" (*shivers in
ugliness*). Finally, it is worth noting that there is an autocrop
option in one of the image menus (and PDB has plug_in_autocrop and
In my experinece, unless you're processing, say, 500+ images, it looks
like it'd be more work to get a script to simply open, show, and close
those images, let alone do anything with them, especially in
Scheme/Script-fu, than to do it by hand. (Once it *is* done, however,
it is nice to have, I'm sure.)
One "tool" that may be of help if you do proceed with this - in GIMP,
there is a "Procedure browser" in the Xtns menu in 2.2.8 and 2.3.4
(probably in various others; has this moved yet in CVS?), sometimes
you can search for the action you want to do (e.g. crop) and you'll
get a list of script-fu/pdb procedures, which parameter lists. (Avoid
ones marked deprecated!) Note that, IIRC, script-fu seperates words
with the - (dash) not the _ (underscore) last I checked, although the
PDB shows it the other way around.
Please note that there may be errors in my answer, if so, someone else
may be able to correct them. Take my response with caution.
- Just my two cents
- No man is an island, and no man is unable.
Gimp-developer mailing list