convert bmp file to a array