Functions

babl_variant (format, variant)

cl_disable ()

cl_init ()

cl_is_accelerated ()

config ()

create_chain (ops, op_start, op_end, time, rel_dim, path_root)

create_chain_argv (ops, op_start, op_end, time, rel_dim, path_root)

exit ()

format (format_name)

format_get_name (format)

get_version ()

graph_dump_outputs (node)

graph_dump_request (node, roi)

has_operation (operation_type)

init (argv)

is_main_thread ()

list_operations ()

load_module_directory (path)

parallel_distribute (max_n, func, *user_data)

parallel_distribute_area (area, thread_cost, split_strategy, func, *user_data)

parallel_distribute_range (size, thread_cost, func, *user_data)

param_spec_audio_fragment (name, nick, blurb, flags)

param_spec_color (name, nick, blurb, default_color, flags)

param_spec_color_from_string (name, nick, blurb, default_color_string, flags)

param_spec_color_get_default (self)

param_spec_curve (name, nick, blurb, default_curve, flags)

param_spec_double (name, nick, blurb, minimum, maximum, default_value, ui_minimum, ui_maximum, ui_gamma, flags)

param_spec_enum (name, nick, blurb, enum_type, default_value, flags)

param_spec_file_path (name, nick, blurb, no_validate, null_ok, default_value, flags)

param_spec_format (name, nick, blurb, flags)

param_spec_get_property_key (pspec, key_name)

param_spec_int (name, nick, blurb, minimum, maximum, default_value, ui_minimum, ui_maximum, ui_gamma, flags)

param_spec_path (name, nick, blurb, default_path, flags)

param_spec_seed (name, nick, blurb, flags)

param_spec_set_property_key (pspec, key_name, value)

param_spec_string (name, nick, blurb, no_validate, null_ok, default_value, flags)

param_spec_uri (name, nick, blurb, no_validate, null_ok, default_value, flags)

rectangle_infinite_plane ()

reset_stats ()

serialize (start, end, basepath, serialize_flags)

stats ()

Details

Gegl.babl_variant(format, variant)
Parameters:
Return type:

Babl.Object

Gegl.cl_disable()

Disable OpenCL

Gegl.cl_init()
Raises:

GLib.Error

Returns:

True if OpenCL was initialized

Return type:

bool

Initialize and enable OpenCL, calling this function again will re-enable OpenCL if it has been disabled.

Gegl.cl_is_accelerated()
Returns:

True if OpenCL is initialized and enabled

Return type:

bool

Check if OpenCL is enabled.

Gegl.config()
Returns:

a Gegl.Config

Return type:

Gegl.Config

Returns a Gegl.Config object with properties that can be manipulated to control GEGLs behavior.

Gegl.create_chain(ops, op_start, op_end, time, rel_dim, path_root)
Parameters:
  • ops (str) – an argv style, None terminated array of arguments

  • op_start (Gegl.Node) – node to pass in as input of chain

  • op_end (Gegl.Node) – node to get processed data

  • time (float) – the time to use for interpolatino of keyframed values

  • rel_dim (int) – relative dimension to scale rel suffixed values by

  • path_root (str) – path in filesystem to use as relative root

Raises:

GLib.Error

Create a node chain from an unparsed commandline string.

Gegl.create_chain_argv(ops, op_start, op_end, time, rel_dim, path_root)
Parameters:
  • ops (str) – an argv style, None terminated array of arguments

  • op_start (Gegl.Node) – node to pass in as input of chain

  • op_end (Gegl.Node) – node to get processed data

  • time (float) – the time to use for interpolatino of keyframed values

  • rel_dim (int) – relative dimension to scale rel suffixed values by

  • path_root (str) – path in filesystem to use as relative root

Raises:

GLib.Error

Create a node chain from argv style list of op data.

Gegl.exit()

Call this function when you’re done using GEGL. It will clean up caches and write/dump debug information if the correct debug flags are set.

Gegl.format(format_name)
Parameters:

format_name (str) – A Babl.Object format name, e.g. “RGBA float”

Returns:

the format pointer

Return type:

GObject.Value or None

Returns a value sutable to pass to the Gegl.Buffer constructor or any other property that expects a Babl.Object format.

Gegl.format_get_name(format)
Parameters:

format (GObject.Value) – A Babl.Object pointer

Returns:

the format name

Return type:

str or None

Gegl.get_version()
Returns:

major:

a pointer to a int where the major version number will be stored

minor:

ditto for the minor version number

micro:

ditto for the micro version number

Return type:

(major: int, minor: int, micro: int)

This function fetches the version of the GEGL library being used by the running process.

Gegl.graph_dump_outputs(node)
Parameters:

node (Gegl.Node) – The final node of the graph

Dump the bounds and format of each node in the graph to stdout.

Gegl.graph_dump_request(node, roi)
Parameters:

Dump the region that will be rendered for each node to fulfill the request.

Gegl.has_operation(operation_type)
Parameters:

operation_type (str) – the name of the operation

Returns:

A boolean telling whether the operation is present or not. This also returns true for any compat-name registered by operations.

Return type:

bool

Gegl.init(argv)
Parameters:

argv ([str] or None) – a pointer to the array of command line arguments.

Returns:

a pointer to the array of command line arguments.

Return type:

argv: [str]

Call this function before using any other GEGL functions. It will initialize everything needed to operate GEGL and parses some standard command line options. argc and argv are adjusted accordingly so your own code will never see those standard arguments.

Note that there is an alternative way to initialize GEGL: if you are calling GLib.OptionContext.parse() with the option group returned by #gegl_get_option_group(), you don’t have to call Gegl.init().

Gegl.is_main_thread()
Return type:

bool

Gegl.list_operations()
Returns:

An alphabetically sorted array of available operation names. This excludes any compat-name registered by operations. The list should be freed with GLib.free after use. — str **operations; int n_operations; int i;

operations = Gegl.list_operations (&n_operations); g_print (“Available operations:\n”); for (i=0; i < n_operations; i++) { g_print (”\t%s\n”, operations[i]); } GLib.free (operations);

Return type:

[str]

Gegl.load_module_directory(path)
Parameters:

path (str) – the directory to load modules from

Load all gegl modules found in the given directory.

Gegl.parallel_distribute(max_n, func, *user_data)
Parameters:

Distributes the execution of a function across multiple threads, by calling it with a different index on each thread.

Gegl.parallel_distribute_area(area, thread_cost, split_strategy, func, *user_data)
Parameters:

Distributes the processing of a planar data-structure across multiple threads, by calling the given function with different sub-areas on different threads.

Gegl.parallel_distribute_range(size, thread_cost, func, *user_data)
Parameters:
  • size (int) – the total size of the data

  • thread_cost (float) – the cost of using each additional thread, relative to the cost of processing a single data element

  • func (Gegl.ParallelDistributeRangeFunc) – the function to call

  • user_data (object or None) – user data to pass to the function

Distributes the processing of a linear data-structure across multiple threads, by calling the given function with different sub-ranges on different threads.

Gegl.param_spec_audio_fragment(name, nick, blurb, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new GObject.ParamSpec instance specifying a Gegl.AudioFragment property.

Gegl.param_spec_color(name, nick, blurb, default_color, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • default_color (Gegl.Color) – the default value for the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new GObject.ParamSpec instance specifying a Gegl.Color property.

Gegl.param_spec_color_from_string(name, nick, blurb, default_color_string, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • default_color_string (str) – the default value for the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new GObject.ParamSpec instance specifying a Gegl.Color property.

Gegl.param_spec_color_get_default(self)
Parameters:

self (GObject.ParamSpec) – a Gegl.Color GObject.ParamSpec

Returns:

the default Gegl.Color

Return type:

Gegl.Color

Get the default color value of the param spec

Gegl.param_spec_curve(name, nick, blurb, default_curve, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • default_curve (Gegl.Curve) – the default value for the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new GObject.ParamSpec instance specifying a Gegl.Curve property.

Gegl.param_spec_double(name, nick, blurb, minimum, maximum, default_value, ui_minimum, ui_maximum, ui_gamma, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • minimum (float) – minimum value for the property specified

  • maximum (float) – maximum value for the property specified

  • default_value (float) – default value for the property specified

  • ui_minimum (float) – minimum value a user should be allowed to input

  • ui_maximum (float) – maximum value a user should be allowed to input

  • ui_gamma (float) – the gamma that should be used when adjusting the value

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new Gegl.ParamSpecDouble instance.

Gegl.param_spec_enum(name, nick, blurb, enum_type, default_value, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • enum_type (GObject.GType) – the enum type to get valid values from

  • default_value (int) – default value for the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new Gegl.ParamSpecEnum instance.

Gegl.param_spec_file_path(name, nick, blurb, no_validate, null_ok, default_value, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • no_validate (bool) – true if the string should be validated with GLib.utf8_validate

  • null_ok (bool) – true if the string can be None

  • default_value (str) – default value for the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new Gegl.ParamSpecFilePath instance.

Gegl.param_spec_format(name, nick, blurb, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new Gegl.ParamSpecFormat instance specifying a Babl.Object format.

Gegl.param_spec_get_property_key(pspec, key_name)
Parameters:
Return type:

str

Gegl.param_spec_int(name, nick, blurb, minimum, maximum, default_value, ui_minimum, ui_maximum, ui_gamma, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • minimum (int) – minimum value for the property specified

  • maximum (int) – maximum value for the property specified

  • default_value (int) – default value for the property specified

  • ui_minimum (int) – minimum value a user should be allowed to input

  • ui_maximum (int) – maximum value a user should be allowed to input

  • ui_gamma (float) – the gamma that should be used when adjusting the value

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new Gegl.ParamSpecInt instance.

Gegl.param_spec_path(name, nick, blurb, default_path, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • default_path (Gegl.Path) – the default value for the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new GObject.ParamSpec instance specifying a Gegl.Path property.

Gegl.param_spec_seed(name, nick, blurb, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new Gegl.ParamSpecSeed instance specifying an integer random seed.

Gegl.param_spec_set_property_key(pspec, key_name, value)
Parameters:
Gegl.param_spec_string(name, nick, blurb, no_validate, null_ok, default_value, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • no_validate (bool) – true if the string should be validated with GLib.utf8_validate

  • null_ok (bool) – true if the string can be None

  • default_value (str) – default value for the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new Gegl.ParamSpecString instance.

Gegl.param_spec_uri(name, nick, blurb, no_validate, null_ok, default_value, flags)
Parameters:
  • name (str) – canonical name of the property specified

  • nick (str) – nick name for the property specified

  • blurb (str) – description of the property specified

  • no_validate (bool) – true if the string should be validated with GLib.utf8_validate

  • null_ok (bool) – true if the string can be None

  • default_value (str) – default value for the property specified

  • flags (GObject.ParamFlags) – flags for the property specified

Returns:

a newly created parameter specification

Return type:

GObject.ParamSpec

Creates a new Gegl.ParamSpecUri instance.

Gegl.rectangle_infinite_plane()
Return type:

Gegl.Rectangle

Returns a Gegl.Rectangle that represents an infininte plane.

Gegl.reset_stats()

Resets the cumulative data gathered by the Gegl.Stats object returned by Gegl.stats().

Gegl.serialize(start, end, basepath, serialize_flags)
Parameters:
Return type:

str

Gegl.stats()
Returns:

a Gegl.Stats

Return type:

Gegl.Stats

Returns a Gegl.Stats object with properties that can be read to monitor GEGL statistics.