Gimp-Python is a scripting extension for Gimp, similar to Script-Fu. The main difference is in what is called first. In Script-Fu, the script-fu plugin executes the script, while in Gimp-Python the script is in control.
In fact, you will find that the Gimp-Python scripts start with the line #!/usr/bin/python. The gimp extension is loaded with the familiar import command.
Another point of difference between Gimp-Python and Script-Fu is that Gimp-Python stores images, layers, channels and other types as objects rather than just storing their ID. This allows better type checking that is missing from Script-Fu, and allows those types to act as objects, complete with attributes and methods.
Also, Gimp-Python is not limited to just calling procedures from the PDB. It also implements the rest of libgimp, including tiles and pixel regions, and access to other lower level functions.
Gimp-python consists of a Python module written in C and some native python support modules. You can build pygimp with the commands:
./configure make make install |
This will build and install gimpmodule and its supporting modules, and install the sample plugins in gimp's plugin directory.
Next | ||
The Structure Of A Plugin |