On Thursday 01 May 2008, Choi, JiHui wrote:
> I tried to learn scheme, but it's so difficult.

> and if I want another actions, I have to learn about relative
> functions. so I think, I just want to use gimp, not to learn
> scheme. I don't know and don't have any interesting about scheme.
> humm.. anyway.. to learn scheme is the only way?
> Isn't there something better than DBP plugin?

No. Scehme is nto the only way. Nowadays you can do your script using 
python - which is a much better language in several terms.

You still use the PDB for some (even most) actions, but calling then 
from python makes a mucheasier to read and write program. 

For operating on all images in a given dir,just do:
import os
from gimpfu import *
def do_it (givendir):
    for filename in os.listdir(givendir):
        pdb.gimp_file_open(filename, filename)
        layer = image.layers[0]
        pdb.gimp_by_color_select(drw, "#fff", 0, CHANNEL_OP_REPLACE, True, 0, 
0, False)
        pdb.gimp_file_save(image, filename, filename)

Followed by the "register" and "main"  boilerplate code you can copy 
from any other python plug-in (there are a couple bundled with 
gimp-python install) - the "givendir" variable will be automatically 
inputed from a generated interface - you can use PF_DIR or PF_STRING 
for inputing it. (or even hard code it if you are running this only 

For running gimp-python in windows, you need to install the Python 
language (from www.python.org), python-cairo and python-gtk+ bidings 
(I think just these).

Gimp-user mailing list

Reply via email to