加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

MATLAB保存的图片全是黑色,无法显示!【转】

(2013-06-16 17:01:37)
分类: 杂音
今天用MATLAB作图,碰到一个问题:想把结果保存成为图片,结果,失望,保存之后打开一片黑色。之后再试了几下,不论是jpg,bmp还是png都不行,并且显示如下错误提示:

Warning: Problems in UIW_SetUpGLPrinting

只好Google,最后,总算找到答案,原来是着色属性的问题,修改其实很简单:

set(gcf, 'Renderer', 'ZBuffer')

这样,就把属性从OpenGL改到了ZBuffer,这样,就可以了。

当然,如果上面还不行,可以试试下面的办法(我从一个论坛上拷过来的):

 I believe this happens when the OpenGL API doesn't work as expected,
and that could be for more than one cause. If you're having this issue, try to follow the
next steps one at a time, and see if it helps.

1 - Be sure to install the correct driver for your specific graphic board. Not so obvious,
    because some manufacturers may have very specific versions. XFX is an example.
    
  - Reboot

  - Run your code again

2 - Check if your OpenGL API is good to go. Install OpenGL Extensions Viewer and check it.
    Run the renderer test if you need to.

3 - Install the latest DirectX. Test it with dxdiag.
 
  - Reboot

  - Run your code again

4 - If everything else fails, you could try to install Glide Wrapper 0.84c. It helps on some
    OpenGL problems. Configure it if you need.

Hope that helps,
Marchesi.

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有