use c++ for bitmap_initialize