finish bitmap output
pull repeated functions out of `output_bmp_info_hdr`