added bmpgen.cpp tool