The color-to-alpha operation is when a color is taken from all the pixels in the image and converted to transparent, this is especially useful to extract hand written or free drawing from a fully white paper.
Below is basic GEGL code to convert the white color to alpha, it used to work on Ubuntu 12.04, but after re-installing it, it looks like there is bug in GEGL.
I'm not sure what the previous setup was but the command line is mostly the same:
~/gegl/bin/gegl --xml '
<?xml version="1.0" encoding="UTF-8"?>
<gegl>
<node operation="gegl:color-to-alpha">
<params>
<param name="color">white</param>
</params>
</node>
<node operation="gegl:load" id="clone0">
<params>
<param name="path">input.png</param>
</params>
</node>
</gegl>
' --output gegl-output.png
The input image being used.
The GIMP correct (i.e. desired) output, it used to work the same with GEGL.
The current GEGL incorrect output.
Environment and Versions:
The gegl and babl are installed using the following command lines, because GIMP 2.8 is also installed and using another version of GEGL:
$ tar -jxvf babl-0.1.10.tar.bz2
$ cd babl-0.1.10/
$ ./configure --prefix=$HOME/gegl
$ make
$ make install
$ export PKG_CONFIG_PATH="$HOME/gegl/lib/pkgconfig"
$ cd ..
$ tar -jxvf gegl-0.2.0.bz2
$ cd gegl-0.2.0/
$ ./configure --prefix=$HOME/gegl
$ make
$ make install
Note: he images are best to be opened with GIMP to see the alpha Chanel.
Install babl and gegl from their git repo. git://git.gnome.org/babl
and git://git.gnome.org/gegl
. It solved the problem (most probably a gegl bug).