7 GeglNode
*graph
, *src
, *sink
;
8 GeglBuffer
*buffer
= NULL
;
10 gegl_init (&argc
, &argv
);
14 g_print ("GEGL based image conversion tool\n");
15 g_print ("Usage: %s <imageA> <imageB>\n", argv
[0]);
19 graph
= gegl_node_new ();
20 src
= gegl_node_new_child (graph
,
21 "operation", "gegl:load",
24 sink
= gegl_node_new_child (graph
,
25 "operation", "gegl:buffer-sink",
29 gegl_node_link_many (src
, sink
, NULL
);
31 gegl_node_process (sink
);
32 g_object_unref (graph
);
34 /* FIXME: Currently a buffer will always be returned, even if the source is missing */
37 g_print ("Failed to open %s\n", argv
[1]);
41 graph
= gegl_node_new ();
42 src
= gegl_node_new_child (graph
,
43 "operation", "gegl:buffer-source",
46 sink
= gegl_node_new_child (graph
,
47 "operation", "gegl:save",
51 gegl_node_link_many (src
, sink
, NULL
);
53 gegl_node_process (sink
);
54 g_object_unref (graph
);
56 g_object_unref (buffer
);