How can I save a figure as a BMP file in MATLAB 7.2 (R2006a) if I lock my computer?
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 27 Juin 2009
Modifié(e) : MathWorks Support Team
le 31 Oct 2014
I execute the following commands in MATLAB 7.2 (R2006a):
peaks;
pause(10)
saveas(gcf,'myfile.bmp')
If I lock and unlock my computer, no BMP file is created and I receive this error message: ERROR: Warning: Failed in BitBlt, last error code 00000006, return code 0 > In D:\Applications\MATLAB\R2006a\toolbox\matlab\graphics\private\render.p>render at 129 In print at 263 In saveas at 159 ??? Error using ==> print Error using ==> print Error using ==> graphics\private\render Error using ==> hardcopy Out of memory. Type HELP MEMORY for your options. Error in ==> saveas at 159 print( h, name, ['-d' dev{i}] )
Réponse acceptée
MathWorks Support Team
le 18 Oct 2013
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 "-dbmp" option with the PRINT command to save the figure as a BMP file.
print (gcf, '-dbmp', 'myfile.bmp')
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Printing and Saving dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!