Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessing GIMP’s internal GEGL operations outside of GIMP
#1
Hi everyone,

GIMP defines many custom GEGL operations with the gimp:* prefix (for example, gimp:color-balance, gimp:threshold, etc.).
As far as I can tell, these are registered programmatically inside GIMP during startup - they don’t exist as separate loadable GEGL plugins or .so files.

Is there any supported or practical way to make these gimp:* operations available to an external GEGL-based application, or to initialize the same set of operations in another process?

Specifically:

- Can GIMP’s GEGL operation registration be triggered externally (e.g. by linking or loading GIMP libraries)?
- Has anyone successfully reused these operations outside of GIMP’s runtime environment?
- Or is embedding code inside GIMP itself the only way to access them?

Any insight or code references from the GIMP source tree where these ops are registered would be very helpful.

Thanks!
Reply
#2
(Today, 09:43 AM)activey Wrote: Hi everyone,

GIMP defines many custom GEGL operations with the gimp:* prefix (for example, gimp:color-balance, gimp:threshold, etc.).
As far as I can tell, these are registered programmatically inside GIMP during startup - they don’t exist as separate loadable GEGL plugins or .so files.

Is there any supported or practical way to make these gimp:* operations available to an external GEGL-based application, or to initialize the same set of operations in another process?

Specifically:

- Can GIMP’s GEGL operation registration be triggered externally (e.g. by linking or loading GIMP libraries)?
- Has anyone successfully reused these operations outside of GIMP’s runtime environment?
- Or is embedding code inside GIMP itself the only way to access them?

Any insight or code references from the GIMP source tree where these ops are registered would be very helpful.

Thanks!

Best place to start is https://gegl.org/  which mentions other applications using GEGL

For linux:
This being a Gimp forum, Gimp has GEGL as a dependancy but GEGL (+ its own dependencies) is a separate installation.

There are .so files in usr/lib/x86_64-linux-gnu/gegl-0.4/ and some of those do look Gimp specific (like seamless clone perhaps). For Gimp 3 , you can use gegl in a script-fu or python plugins. The batcher python plugin is a good example.  just as a Gimp example, attached is a python plugin Find it in the tools menu. Also in the zip is the equivalent script-fu (same registration - you need to swap executable )


Outside of Gimp, in a terminal gegl --help starts off with this

Code:
usage: gegl [options] <file | -- [op [op] ..]>

  Options:
     -h, --help      this help information
     --list-all      list all known operations
     --exists        return 0 if the operation(s) exist
     --info          output information about the operation:
                     name, description, properties details.
     -i, --file      read xml from named file
.......etc....     
best of luck


Attached Files
.zip   for-gegl.zip (Size: 1.59 KB / Downloads: 2)
Reply


Forum Jump: