我已阅读并尝试了解决方案,但问题仍未解决。在asp.net中保存图片时出现gdi +错误。
byte[] bytes1 = Convert.FromBase64String(t1);
var randomFileName = Guid.NewGuid().ToString().Substring(0, 4) + ".png";
var path1 = Path.Combine(Directory.GetCurrentDirectory(), "Content", "images", "16x9", randomFileName);
using (MemoryStream ms1 = new MemoryStream(bytes1)) {
System.Drawing.Image image1 = System.Drawing.Image.FromStream(ms1);
image1.Save(path1);
}