[gegl] docs: initial gegl-chain documentation



commit 695a039ff400d72bc17753eda1e7c919ba9fa1cf
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Apr 6 20:53:57 2017 +0200

    docs: initial gegl-chain documentation

 docs/Makefile.am     |    2 +-
 docs/commandline.txt |   43 +++++++++++--------------------------------
 docs/gegl-chain.txt  |   34 ++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 33 deletions(-)
---
diff --git a/docs/Makefile.am b/docs/Makefile.am
index c2a35bd..f5d7e88 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -14,7 +14,7 @@ sync-txt:
        txts=ASC_DOC="index.html "`for a in *.txt;do echo -n ' '$$a|sed s/txt/html/;done;echo ''`;\
          txts=$$txts" #ASC_DOC_HOTPATCH";\
                cat Makefile.am | sed "s/ASC\_DOC.*ASC_DOC_HOTPATCH/$$txts/" > /tmp/mktmp; cp /tmp/mktmp 
Makefile.am;
-ASC_DOC=index.html  abyss_policy.html bugzilla.html build.html commandline.html contribute.html 
copyright.html NEWS.html development.html editor.html environment.html features.html glossary.html 
hello-world.html journal.html operation-api.html source-overview.html #ASC_DOC_HOTPATCH
+ASC_DOC=index.html  abyss_policy.html bugzilla.html build.html commandline.html contribute.html 
copyright.html NEWS.html development.html editor.html environment.html features.html glossary.html 
hello-world.html journal.html operation-api.html source-overview.html gegl-chain.html #ASC_DOC_HOTPATCH
 
 
 HTML_FILES = \
diff --git a/docs/commandline.txt b/docs/commandline.txt
index 91033e8..604c5e3 100644
--- a/docs/commandline.txt
+++ b/docs/commandline.txt
@@ -1,45 +1,24 @@
-//XML data model
-//~~~~~~~~~~~~~~
-//The tree allows clones, making it possible to express any acyclic graph where
-//the nodes are all of the types: source, filter and composer.
-//
-//GEGL can write and reads its data model to and from XML. The XML is chains of
-//image processing commands, where some chains allow a child chain (the 'over'
-//operator to implement layers for instance).
-//
-//The type of operation associated with a node can be specified either with a
-//class attribute or by using the operation name as the tag name for the node.
+gegl commandline
+----------------
 
-gegl
-~~~~
-GEGL provides a commandline tool called gegl, for working with the XML data
-model from file, stdin or the commandline. It can display the result of
-processing the layer tree or save it to file.
+In addition to installing a library, GEGL also installs gegl - a binary/program
+that permits doing image processing from the commandline as well as an aid
+during development of GEGL operations.
 
 Some examples:
 
-Render a composition to a PNG file:
+Render a composition to a PNG file, the composition can be in GEGLs XML format
+or the terser link:gegl-chain.html[gegl-chain] gegl-chain one-liner friendly
+format.
 
- $ gegl composition.xml -o composition.png
-
-Using gegl with png's passing through stdin/stdout piping.
-
- $ cat input.png | gegl -o - -x "<gegl>
-    <tree>
-      <node class='invert'/>
-      <node class='scale' x='0.5' y='0.5'/>
-      <node class='png-load' path='-'/></tree></gegl>" > output.png
-
-The latest development version is available in the gegl repository in GNOME
-git.
+ $ gegl composition -o composition.png
 
 gegl usage
-^^^^^^^^^^
+~~~~~~~~~~
+
 The following is the usage information of the gegl binary, this documentation
 might not be complete.
 
 -------
 sys::[bash -c '../bin/gegl -h 2>&1']
 -------
-
-
diff --git a/docs/gegl-chain.txt b/docs/gegl-chain.txt
new file mode 100644
index 0000000..ba4baae
--- /dev/null
+++ b/docs/gegl-chain.txt
@@ -0,0 +1,34 @@
+gegl-chain
+----------
+
+A serialization format for GEGL graphs that grew out of the desire to
+write one-liner image processing tasks on the commandline.
+
+Everything after -- in a GEGL commandline that contains an input image
+is considered the chain of operations.
+
+ $ gegl input.jpg -o output.png -- noise-reduction unsharp-mask
+
+If GEGL is built linking to micro raptor gui, the gegl binary can also act as
+an image viewer as well as visualizer for the result of chains of operations.
+
+ $ gegl input.jpg -- noise-reduction unsharp-mask
+
+If an argument on the commandline part of the chain contains a = it is a
+property assignment for the preceding operation. For example:
+
+ $ gegl in.jpg -- noise-reduction iterations=4 unsharp-mask
+
+If you try to assign a property that doesn't exist, the error message will
+contain a list of valid properties for the operation.
+
+The format treats input and output pads as explicitly linked when they follow each other, to create a 
sub-chain hooked up to an aux input assign the aux pad with the sub chain contained in square brackets, like 
this:
+
+ $ gegl in.jpg -- noise-reduction iterations=2 over aux=[ text string='hello there' color=white size=32 
translate x=100 y=100 dropshadow radius=2 x=1.5 y=1.5 ]
+
+And finally, it is possible to create links in the chain, reusing permitting
+creating masks for color adjustments based on image content, as well as other
+forms of buffer reuse.
+
+ $ gegl in.jpg -- noise-reduction iterations=2 over aux=[ text string='hello there' color=white size=32 
dropshadow id=foo translate x=100 y=100 radius=2 x=1.5 y=1.5 ] over aux=[ ref=foo translate y=300 ]
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]