started on the generation function
Merge http://github.com/niilohlin/imlib

first merge