This article is a simple example about how to use GIL to generate histogram.
usually, a png file is managed as a image view of gil. also, a image view could be treated as 2D array. To generate histogram, we should just make a relation between the histogram element value and the pixel value.
In the following example, firstly generate a png file with a histogram, then read back to histogram from the generated png file.
Reference:
http://www.cppprog.com/boost_doc/libs/gil/doc/index.html
http://www.cppprog.com/2009/0305/76.html