图片转base32
Bitmap bmp = new Bitmap(@"E:\TrainingPlatform\TrainingPlatform\Images\11floor.jpg"); MemoryStream ms = new MemoryStream(); bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] arr = new byte[ms.Length]; ms.Position = 0; ms.Read(arr, 0, (int)ms.Length); ms.Close(); String strba = Convert.ToBase64String(arr);