Export figure is painfully slow. Save as png is fast. Why?
25 次查看(过去 30 天)
显示 更早的评论
I tend to export some figures for use in presentations etc. I have noticed that for some figures (perhaps those with lots of data), Matlab will grind to a halt when I try to export the image to the OS pasting buffer. Sometimes I end up killing the Matlab session.
Recently, I figured out that if I instead save the image as e.g. *.png, it is really fast. Any idea why this is? Is it a bug? How hard can it be to render into a VGA-ish image buffer?
0 个评论
采纳的回答
Patrick Kalita
2011-6-20
The reason is that MATLAB is not exactly rendering to a "VGA-ish image buffer" when you copy to clipboard. The default setting is for MATLAB to attempt to copy in a Windows Metafile format. This format mixes vector and bitmap elements. So, yeah, if you have a lot of data and it is trying to encode those in a vector format, it could take a while.
You do have control over the format MATLAB uses for figure copying. In a figure window select Edit -> Copy Options. In the Preferences dialog that opens if you select "Bitmap" you will get a simple bitmap version of the figure copied to the clipboard -- which should be faster.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!