add a method to rebuild bmp header.