Error Saving Figure: Error using hgexport (line 1051) Error using print (line 215) Images must contain fewer than 2^32 -1 bytes of data

7 ビュー (過去 30 日間)
D G
D G 2017 年 9 月 4 日
コメント済み: D G 2017 年 9 月 7 日
Attempting to save a .png. MATLAB is throwing: " Error Saving Figure: Error using hgexport (line 1051) Error using print (line 215) Images must contain fewer than 2^32 -1 bytes of data " I can successfully save .fig and .pdf. I do not think I recently created a print.m.

回答 (1 件)

Neil Guertin
Neil Guertin 2017 年 9 月 7 日
When saving a .fig file, the entire contents of the figure must be saved for future editing, including all of the data, which in your case looks like more that 4GB. If you wish to do this, use MAT-file Version 7.3. Set this in Preferences > General > MAT-Files.
More likely you want to save just the .png image. Make sure you select "*.png" from the "Save as type" menu of the Save As dialog, or that you use the "-dpng" option of the "print" command.
  1 件のコメント
D G
D G 2017 年 9 月 7 日
I don't think this is exactly what happened. I could save a .fig but not a .png. When I restarted MATLAB and retried saving the .png everything went well.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by