Restructured the program. Not doing everything in main, one method initializes a bmp, and one method writes image data to the initialized bmp