GIMP Developer Resources - GIMP Development. Writing a GIMP Plug-In. Python Documentation. This document outlines the interfaces to GIMP-Python, which is a set of Python modules that act as a wrapper to libgimp allowing the writing of plug-ins for GIMP.
In this way, GIMP-Python is similar to Script-Fu, except that you can use the full set of Python extension modules from the plug-in. Introduction What is it? GIMP-Python is a scripting extension for GIMP, similar to Script-Fu. The main difference is in what is called first. In fact, you will find that the GIMP-Python scripts start with the line ! 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.
Also, GIMP-Python is not limited to just calling procedures from the PDB. Installation GIMP-python consists of a Python module written in C and some native python support modules. . This will build and install gimpmodule and its supporting modules, and install the sample plug-ins in GIMP's plug-in directory. #! Nparams. Gimp Script-Fu. Script-Fu and plug-ins for The GIMP. Simon Budig One of the big advantages of The GIMP is the fact that it can be easily extended with new functionality. However, it is not easy to find documentation about this. I will cover the default scripting extension Script-Fu and some details for programming plug-ins in C. Although there are additional extensions for other languages (Gimp-Perl, Gimp-Python) I will not cover them here.
The PDB (Procedural DataBase) is the most important interface to access the image manipulation functions of The GIMP. Each plug-in enters its functionality into the PDB, which enables it to be used by other plug-ins or scripts. Writing a binding for a programming language – for example Scheme or Perl – just requires mapping the PDB onto the syntax of the target language and providing access to the various parameter types. A typical PDB entry contains this information (this is a screenshot of ): You can see that a function can have different types of input and output parameters. Script-Fu Migration Guide.
Since version 1.0 of GIMP, it has included a powerful scripting language which permits extending the program's capabilities and simplifying repetitive tasks.
This scripting language, called "Script-fu", was based upon the Scheme programming language and implemented the SIOD interpreter written by George J. Carrette while he was a professor at Boston University in the late 80s. This Script-fu interpreter based upon Carrette's SIOD has served GIMP extremely well over the last decade -- thousands of scripts have been written and shared by GIMP users -- but it is starting to show its age and therefore the GIMP development team has decided to replace it with a more modern Scheme interpreter called TinyScheme. One of the main reasons for this changeover is to support international languages and fonts, for which SIOD offered no provision.
There are other benefits as well, but lack of international support was the most significant. Setting an undeclared variable (let* ( (x 4) ) ... ... ... )