BMP library and example program