On Thu, Dec 24, 2020 at 4:20 AM ian martins via gimp-developer-list
<[hidden email]> wrote:
> I'm using gimp 2.10.18. Most functions are easily found in the
> procedure browser, but some don't appear to be there. I don't see
> - Filters>Blur>Median Blur
> - Filters>Blur>Mean Curvature Blur
> - Colors>Auto>White Balance
> - Colors>Tone Mapping>Mantiuk 2006
> Are they available to script-fu? If so, how can they be found?
I do not think so. GIMP/scrip-fu is lacking a way to apply arbitrary
available GEGL operations to a drawable. For the cases where GEGL
operations have taken over the load from gimp-plugins, GIMP developers
have added PDB wrappers/integration for each op, similar to how it had
to be done with plug-ins. To expose the above operations to script-fu
either more PDB wrappers need to be written or a generic mechanism to
invoke a GEGL op (this will be better for the future; since it means
less boiler plate code needed in many places in GIMP for each bit of
I don't know why Median Blur was not made available in the PDB, possibly it
was just an oversight.
I don't know of any more general way to call a GEGL filter from ScriptFu.
In Gimp 3, in another language such as Python, you could use GObject
Introspections to call GEGL, but ScriptFu does not use GI (it only
introspects and calls PDB procedures). Maybe it is possible to modify the
ScriptFu interpreter to provide a Scheme function to call any GEGL filter.
We don't need to enhance Script-Fu to be gegl aware.
We just need a plugin that is gegl aware.
Call the plugin "python-fu-do-gegl-op."
Given a drawable, an operation name like "gegl:median-blur" and a list of
arguments (usually all numeric)
the plugin invokes the gegl operation on the drawable.
Gegl is introspectable, it will tell you the types for parameters to any
and the plugin can check and convert arguments if needed, or substitute
The plugin could be written in Python, which can introspect both Gimp and
When the plugin is introspecting the Gegl op, it is second-order
You can't write the plugin in ScriptFu because it doesn't support GObject
You could write the plugin in C, but easier in a higher language.
A ScriptFu script calls the plugin in the PDB:
(python-fu-do-gegl-op drawable "gegl:median-blur" ( 1, 2.0, ...))