3 An API to extend the functionality of GEGL with new image processing
4 primitive, file loaders, export formats or similar.
6 Each GEGL operation is defined in a `.c` file. Operations that do not
7 rely on external dependencies are bundled into a loadable shared
8 objects. Operations that depend on external libraries are compiled as
9 individual, loadable, shared objects. Take a look at
10 link:brightness-contrast.c.html[the brightness contrast operation] for a
11 point operation, well sprinkled with comments, as a starting point. Each
12 operation is a subclass of one of the provided base classes:
14 link:gegl-operation.h.html[GeglOperation]::
15 The base operation class, which all the other base classes are
16 derived from, deriving from this is often quite a bit of work and is
17 encouraged only when your operation doesn't fit into any of the
20 link:gegl-operation-filter.h.html[GeglOperationFilter]::
21 The filter base class sets up the `GeglBuffer` for input and output
24 link:gegl-operation-point-filter.h.html[GeglOperationPointFilter]::
25 The point-filter base class is for filters where an output pixel
26 only depends on the color and alpha values of the corresponding
27 input pixel. This allows you to do the processing on linear buffers,
28 in the future versions of GEGL, operations implemented using the
29 point-filter will get speed increases due to more intelligent
30 processing possible in the point filter class.
32 link:gegl-operation-area-filter.h.html[GeglOperationAreaFilter]::
33 The area-filter base class allows defining operations where the
34 output data depends on a neighbourhood with an input window that
35 extends beyond the output window, the information about needed
36 extra pixels in different directions should be set up in the prepare
37 callback for the operation.
39 link:gegl-operation-composer.h.html[GeglOperationComposer]::
40 Composer operations are operations that take two inputs named
41 `input` and `aux` and write their output to the output pad `output`.
43 link:gegl-operation-point-composer.h.html[GeglOperationPointComposer]::
44 A base class for composer functions where the output pixels' values
45 depends only on the values of the single corresponding `input` and
48 link:gegl-operation-source.h.html[GeglOperationSource]::
49 Operations used as render sources or file loaders, the process
50 method receives a `GeglBuffer` to write its output into.
52 link:gegl-operation-point-render.h.html[GeglOperationPointRender]::
53 The point-render base class is a specialized source operation, where
54 the render is done in small piece to lower the need to do copies.
55 It's dedicated to operation which may be rendered in pieces, like
58 link:gegl-operation-sink.h.html[GeglOperationSink]::
59 An operation that consumes a `GeglBuffer`, used for file-writers,
60 display (for the sdl display node).
62 link:gegl-operation-temporal.h.html[GeglOperationTemporal]::
63 Base class for operations that want access to previous frames in a
64 video sequence, it contains API to configure the amounts of frames
65 to store as well as getting a `GeglBuffer` pointing to any of the
66 previously stored frames.
68 link:gegl-operation-meta.h.html[GeglOperationMeta]::
69 Used for GEGL operations that are implemented as a sub-graph, at the
70 moment these are defined as C files but should in the future be
71 possible to declare as XML instead.
73 To create your own operations you should start by looking for one that
74 does approximately what you already need. Copy it to a new `.c` source
75 file, and replace the occurrences of the filename (operation name) in