C#将一个bitmap位图通过base64编码成一个字符串
byte[] image = null; using (FileStream filestrm = new FileStream(@"C:\mypic.bmp",FileMode.Open, FileAccess.Read)) { using (BinaryReader reader = new BinaryReader(filestrm)) { img = new byte[reader.BaseStream.Length]; for (int i = 0; i < reader.BaseStream.Length; i++) { img[i] = reader.ReadByte( ); } } } string ConvertedbmpAsString = img.Base64EncodeBytes();