标签:
string path = System.IO.Directory.GetCurrentDirectory() + @"\POIImages\";
Guid imgid = Guid.NewGuid();
byte[] ImageByte = Convert.FromBase64String(pic);
/// <summary> /// 存储图片 /// </summary> /// <param name="ImageByte"></param> /// <returns></returns> public void SaveImage(byte[] ImageByte,Guid imgid,string path) { //string path = System.IO.Directory.GetCurrentDirectory() + @"\POIImages\"; FileStream fileStream = null; FileInfo fileInfo = new FileInfo(path + imgid+".png"); fileStream = fileInfo.OpenWrite(); fileStream.Write(ImageByte, 0, ImageByte.Length); fileStream.Close(); }
标签:
原文地址:http://www.cnblogs.com/bobo-show/p/5138951.html