C# Base64字符串生成图片:
//签字图片Base64格式去除开头多余字符data:image/png;base64, strSignImg = strSignImg.Substring(strSignImg.IndexOf(‘,‘) + 1); //签名Base64生成图片,返回图片路径 string rootPath = AppContext.BaseDirectory; //图片生成路径 string signImgPath = Path.Combine(rootPath, "UploadFiles\\SignImgs"); //如果不存在就创建 SignImgs 文件夹 if (!Directory.Exists(signImgPath)) { Directory.CreateDirectory(signImgPath); } //输出图片文件 File.WriteAllBytes(signImgPath + "\\SignImg_" + DateTime.Now.Ticks.ToString() + ".png", Convert.FromBase64String(strSignImg));//将base64转成图片