System.IO.FileStream fs = System.IO.File.OpenRead("c:\\Winter.jpg");//传文件的路径即可
System.IO.BinaryReader br = new BinaryReader(fs);
byte[] bt = br.ReadBytes(Convert.ToInt32(fs.Length));
string base64String = Convert.ToBase64String(bt);
br.Close();
fs.Close();