runliuv

runliuv@cnblogs

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

System.Runtime.InteropServices.ExternalException:“GDI+ 中发生一般性错误。”

原因:文件夹不存在。

解决方法:

if (!Directory.Exists(imageDir))
                {
                    Directory.CreateDirectory(imageDir);
                }

 

检查并创建文件夹。

posted on 2022-09-30 11:01  runliuv  阅读(404)  评论(0)    收藏  举报