Quoting Pablo Yaggi <pya...@alsurdelsur.com>:

> So ..., I think a couple of things are not clear to me about gimp,
> if plugins communicate with the core of gimp thought a pipe, I
> should be able to create a plugin to do what i want, even
> call other plugins, but could that plugin be executed from outside
> the core ?, ...


> even so it is necesary that gimp is running before
> doing it ?

Yes, if you want to use plug-ins or scripts then you will want GIMP to  
be running (unless you want to reimplement all of the functionality of  
handling those plug-ins using libgimp).

> are the core and gui strict releated, i mean are the same
> thing? can the gui be down, and the core working ?

Yes, you can execute GIMP without the GUI by passing the  
'--no-interface' ('-i') option on the command line. Script-fu code can  
be passed to GIMP on the command line as well, if you know what that  
code is in advance. If you need a more interactive approach, you could  
also have GIMP running in a server mode where Script-fu commands are  
passed over TCP.

> In other words, is it possible in any way to use gimp for
> automatic image processing/generating, because GEGL its very
> promissing but gimp is fully charged with plugins and tools,
> and It sould be very nice to use all that power for automatic
> process.

First, I would propose that you investigate Imagemagick command line  
tools ( http://www.imagemagick.org/ ) and see if they present a better  

Second, you should investigate using GEGL. It is particularly targeted  
for the type of activity you are pursuing and your participation could  
help advance its progress.

If neither of those two options seem desirable then I would present  
the following GIMP-based options:

1) Invoke GIMP from your C program, passing the commands you wish  
executed as Script-fu in batch mode ('-b').

2) If you need lower level processing than provided by Script-fu,  
write your code as a GIMP plug-in and invoke your plug-in from a batch  
Script-fu command. Example:
   gimp -i -b '(plug-in-pablos-function RUN-NONINTERACTIVE parameter1  
parameter2)' -b '(quit 0)'

3) Run an interactive server, as briefly described in this ML posting:

4) Write your code as a GIMP plug-in per the tutorial described here:
    ( http://gimp.org/docs/plug-in/sect-essentials.html )

however, you should register an 'init' procedure which invokes your  
plug-in (perhaps passing it command line parameters).

This will have the effect of your plug-in automatically being executed  
when GIMP is run; therefore do NOT put your autoexecuted plug-in into  
the standard GIMP plug-in folders (or you will "break" normal usage of  
GIMP). Instead, create a custom gimprc file (e.g.,  
"$HOME/gimprc.pablo") which adds the path of your autoexecuted plug-in  
to the plug-in search path:

You then can invoke GIMP, specifying the alternate gimprc:
   gimp -i -g $HOME/gimprc.pablo


There is little difference between 2) and 4) in net effect, but I  
thought I would try to explain it anyway (I have never tried the  
fourth method). Usually the 'init' procedure is not used for  
individual plug-ins -- it is used to configure things for entire  
packages of multiple plug-ins (such as Python-fu or the GIMP Animation  

Gimp-developer mailing list

Reply via email to