How to write a filter
GEGL filters are also called “GEGL operations” or “GEGL plug-ins”. In GIMP, we often just call them “filters” or “effects”. You may see any of these naming interchangeably, they usually refer to the same thing.
Third-party filters will appear automatically in the list of filters available from the “GEGL Operation” dialog, or in the Search Actions dialog. It is also possible to make them available in menus.
What makes filters very powerful is that they offer automatic on-canvas previews, with split view, and they are not specific to a version of GIMP (your GEGL operation will be usable in GIMP 2.10, 3.0, 3.2 or even any other software using GEGL if they have a generic operation interface).
You may consider a filter as a black box to which you give an input
image (a GeglBuffer
),
or sometimes even none or several input images, various arguments, and
which returns an output image.
Tutorial for Filter’s Development
This tutorial will explain how to create your own operation (for you, it won’t be a black box anymore!).
Note that GEGL operations must be compiled into a dynamic library which GEGL will load. This means that filters are usually implemented in C (or some other compiled language which can use the GEGL API).