将base64编码转换图片
/// <summary> /// 二进制Base64编码转图片 /// </summary> /// <param name="bytes"></param> /// <returns></returns> public string ByteToPicture(string bytes) { string[] urls = bytes.Split(','); string u = urls[1]; byte[] by = Convert.FromBase64String(u); MemoryStream ms = new System.IO.MemoryStream(by); Bitmap bmImage = new Bitmap(ms); string pName = Context.Server.MapPath("~/File/" + Guid.NewGuid().ToString() + ".png"); bmImage.Save(pName); return pName; }