process


Description:

public void process ()

Render a composition.

This can be used for instance on a node with a "png-save" operation to render all necessary data, and make it be written to file. This function wraps the usage of a GeglProcessor in a single blocking function call. If you need a non-blocking operation, then make a direct use of work. See Processor.

--- GeglNode *gegl; GeglRectangle roi; GeglNode *png_save; unsigned char *buffer;

gegl = gegl_parse_xml (xml_data); roi = gegl_node_get_bounding_box (gegl);

create png_save from the graph, the parent/child relationship

only mean anything when it comes to memory management.

png_save = gegl_node_new_child (gegl, "operation", "gegl:png-save", "path", "output.png", NULL);

gegl_node_link (gegl, png_save); gegl_node_process (png_save);

buffer = malloc (roi.w*roi.h*4); gegl_node_blit (gegl, 1.0, &roi, babl_format("R'G'B'A u8"), buffer, GEGL_AUTO_ROWSTRIDE, GEGL_BLIT_DEFAULT);

Parameters:

this

a Node without outputs.