How to avoid Out of Memory (error code 00000006, return code 0) when using the print command?

1 visualizzazione (ultimi 30 giorni)
I perform the following command after generating a figure :
print (gcf, '-dbitmap', [num2str(reg) '_' Name1 '.bmp'])
this works fine when I'm at work but when my computer is locked (I use a scheduled task) it generates the following error:
Warning: Failed in BitBlt, last error code 00000006, return code 0
> In C:\Program Files\MATLAB\R2014a\toolbox\matlab\graphics\hardcopy.p>hardcopy at 36
In graphics\private\render at 109
In print>LocalPrint at 276
In print at 233
In TTS_GEM at 42
Error using print>LocalPrint (line 291)
Out of memory. Type HELP MEMORY for your options.
Error in print (line 233)
LocalPrint(pj);
Error in TTS_GEM (line 42)
print (gcf, '-dbitmap', [num2str(reg) '_' Name1 '.bmp'])
I read the following answer to a previous question in the forum:
The SAVEAS function uses the '-dbitmap' option to print, which works by performing a screen capture. Since the screen is locked, the data cannot be captured.
To work around this, use the PRINT command to save the figure as a BMP-file.
print (gcf, '-dbmp', 'myfile.bmp')
The point is that using '-dbmp' instead of '-dbitmap' doesn't yield the same results (the chart is unreadable).
How can I avoid this and be able to save a good quality chart when my computer is locked at night?
  1 Commento
Geoff Hayes
Geoff Hayes il 27 Giu 2014
Rather than saving the figure as a bitmap, perhaps try to save just the figure and (later, once the computer is unlocked) manually save the figure as a bitmap. See http://www.mathworks.com/help/matlab/ref/savefig.html for usage of the savefig function.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Printing and Saving in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by