MATLAB Answers

Exporting images (png) through export_fig - painfully slow

조회 수: 9(최근 30일)
John Cruce
John Cruce 2021년 9월 17일
답변: Yair Altman 2021년 9월 19일 15:44
I'm using export_fig to export a figure to a high resolution png and it's painfully slow. Takes about 36 seconds to perform the export. I also see the following warning upon export:
Warning: print2array generating a 83.6M pixel image. This could be slow and might also cause memory problems
Any suggestions on alternatives to speed up this portion of my code?
  댓글 수: 1
darova 2021년 9월 19일 14:10
Can't you reduce resolution?

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2021년 9월 19일 14:14
Try comparing it to exportgraphics() but you'd need r2020a or later.

Yair Altman
Yair Altman 2021년 9월 19일 15:44
Try to either reduce the resolution (the -r450 part), or to save as a vector-graphics image (PDF/EPS) rather than a PNG bitmap.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by