GDI+ 中发生一般性错误。
2008-12-29 12:52
246 查看
调试程序时发生了“GDI+ 中发生一般性错误”,其代码如下:
string relpath = "images/" + Guid.NewGuid().ToString() +".jpg";
string saveFileName = _path + relpath;
objBitmap.Save(saveFileName,System.Drawing.Imaging.ImageFormat.Jpeg);
经过找原因,发现在自己的目录下没有images这个目录而导致这个错误的发生。加上images目录就解决这个问题了。
string relpath = "images/" + Guid.NewGuid().ToString() +".jpg";
string saveFileName = _path + relpath;
objBitmap.Save(saveFileName,System.Drawing.Imaging.ImageFormat.Jpeg);
经过找原因,发现在自己的目录下没有images这个目录而导致这个错误的发生。加上images目录就解决这个问题了。
相关文章推荐
- 保存Bitmap到内存流中引发“GDI+中发生一般性错误”
- GDI+中发生一般性错误之图片转化为字节数组
- GDI+ 中发生一般性错误
- GDI+ 中发生一般性错误
- System.Runtime.InteropServices.ExternalException: GDI+ 中发生一般性错误
- GDI+中发生一般性错误的解决办法
- GDI+发生一般性错误的解决方法
- GDI+中发生一般性错误的解决办法
- .net生成缩略图及水印图片时出现GDI+中发生一般性错误解决方法
- “GDI+中发生一般性错误” 的解决办法!
- GDI+中发生一般性错误的解决办法
- GDI+中发生一般性错误(asp.net(C#))
- [转载]GDI+中发生一般性错误
- System.Drawing.Image.Save 方法而导致“GDI+ 中发生一般性错误”
- GDI+中发生一般性错误的解决办法(转帖)
- GDI+中发生一般性错误
- GDI+中发生一般性错误的解决办法
- GDI+中发生一般性错误
- C# .NET开发图形图像程序时提示"GDI+ 中发生一般性错误"
- Save()发生“GDI+ 中发生一般性错误”