Tutorials & articles | Back |
17/10/2009 (long edit, finished on Nov.12, 2009)
Converting an image to B&W (cont’d)
One of the most requested features for The Gimp is 16/32 bit support (it currently supports 8 bits per pixel), CMYK, etc…
In order to get this feature, though, most of the core of The Gimp needs to be overhauled. This is a really big project, and it’s on its way. The Gimp is being modified to use GEGL, it’s new core, which will add this and lots of other features.
v2.8 is supposed to have a nearly complete integration of GEGL, but in v2.6 (the current version), we can already enjoy some benefits. You can let The Gimp use GEGL for some of it’s operations (though this doesn’t give the user any benefit -in theory-), and you can also use some of the GEGL operators available.
I will talk here about C2G, a rather interesting GEGL operator which converts an image to B&W.
All the methods described in the first article were “linear”, in the sense that a pixel of a given colour always gets the same grey value, regardless of its position on the screen.
C2G is a more advanced algorithm, in the sense that it tries to simulate the human vision. In short, a grey value a given pixel depents on its’ position on the image, and also on the values of its’ sorrounding pixels.
Here goes a typical example:
![]() Original | ![]() Channel Mixer |
![]() C2G | |
You can see that while Channel Mixer results in the center color being totally uniform, C2G creates some “noise” on that rectangle. As you move closer to the center, the zone gets more “noisy”.
Now let’s apply C2G to a real picture:
![]() Original | ![]() Channel Mixer |
![]() C2G | |
C2G gets a far more noisy picture, but also with a nice B&W HDR look. This is what people (me included) like about this filter, it gets a nice extreme touch to any picture.
You can find C2G under “Tools > GEGL Operation” menu. Select C2G on the operator selector.
Now for the options. There’s not a lot of documentation, so please take the rest of the article with a grain of salt.
First, C2G is really CPU intensive. My recommendation is to disable the preview, set the settings you think will give you the desired result and enable it again. Changing the values with preview enabled causes C2G to update the image with every change you make.
The C2G options screen is divided in two groups:

The first 3 options are, let’s call them, “spatial”. They govern the radius of the algorithm, that is: how far it looks around the current pixel -I tend to keep it at it default-, the samples it takes and the iterations it does.
I’ve found that “samples” has a great impact on noise, reducing it as you take more samples.
I tend to leave the “iterations” setting quite low -around 5 or 10, while the default is 23- because it has a great impact on the speed.
The “same spray” option somehow speeds the calcs up, and greatly reduces the noise, but combined with a big radius value makes “ghosts” appear on your image.
Finally, the second group of options control the strength of the effect and the applied gamma.
The “Strength” option reduces/enhances the contrast of the resulting image (a low value results in a vintage-look image).
I haven’t played a lot with the Gamma/Radial Gamma options. They modify (surprise!) the gamma of the resulting image, but I don’t have a clear idea on how they work.
More to come. Enjoy C2G !
Other tutorials and articles from this section:






