Generate BMP file