GDI+ 中发生一般性错误 的解决方法

将 bitmap.Save(page.Response.OutputStream, ImageFormat.Png);

改为:

        MemoryStream MemStream = new MemoryStream(); 
        bitmap.Save(MemStream, ImageFormat.Png);
        MemStream.WriteTo(page.Response.OutputStream);

原文地址:https://www.cnblogs.com/yeagen/p/1361168.html