http://cimg.cvs.sourceforge.net/*checkout*/cimg/CImg/examples/greycstoration4gimp.cpp
