使用GDI+中Image时返回OutOfMemory

jackfrank078 2012-05-08 06:11:01
谁遇到这个问题,使用GDI+中Image时返回OutOfMemory:
代码大概是这样:
Image * pImage=new Image(L".\\res\\common.png");
用pImage->GetLastStatus();返回的是OutOfMemory;
在MSDN上说
Remarks

If you construct a GDI+ object and then immediately call the GetLastStatus method of that object, you can determine whether the constructor succeeded or failed. In such cases, GetLastStatus might return OutOfMemory even though there was plenty of memory available to create the object. Several GDI+ constructors set the status to OutOfMemory when they fail regardless of the reason for failure.

但MSDN好像没说怎么解决,谁遇到过的,给小弟说一下,
...全文
329 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
stjay 2012-05-09
  • 打赏
  • 举报
回复
改成绝对路径试试
文件可能不是图片格式或设备不支持的图片格式
jackfrank078 2012-05-09
  • 打赏
  • 举报
回复
是啊,你觉得是什么问题,应该怎么解决啊
  • 打赏
  • 举报
回复
任意的png都是一样吗

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧