图片转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);

 

posted @ 2017-03-23 16:49  SkyLeo  阅读(627)  评论(0编辑  收藏  举报