GDI+中发生一般性错误 Bitmap Save 异常解决

时间:2024-10-26 06:34:00

1、先看报错时的源代码,此代码已经让用户用了很长时间,都是没有问题的,突然有一点,客户反馈说软件报错“GDI+中发生一般性错误”;我调试了一下,的确这样报错的,那为什么之前一直没有报错呢?

GDI+中发生一般性错误 Bitmap Save 异常解决

4、SolidBrush brush = new SolidBrush(Color.White); StringFormat format = new StringFormat(StringFormatFlags.NoClip); using (Bitmap image = new Bitmap(w, h)) { Graphics g = Graphics.FromImage(image); g.Clear(Color.White);//透明 image.Save(fileName, System.Drawing.Imaging.ImageFormat.Jpeg); g.Dispose(); }

© 2025 长短途
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com