Add ability to write bmp data to arbitrary FILE*