figureの画像ファイル保存を高速に実施したい
Mostrar comentarios más antiguos
お世話になります
figureをjpgやpngで保存したいのですが、saveas や print を使うと 0.3~0.5秒ほどかかってしまいます。
もっと高速に画像ファイルに保存する方法をご存知でしたら教えてください
参考として、以下のようなコードを試したました
figA = figure( ) ;
plot( (0:0.01:4) , sin((0:0.01:4)) , 'b-' ) ;
tic
saveas( figA , [ 'ImageTest1' '.jpg' ] ) ;
toc
tic
saveas( figA , [ 'ImageTest2' '.png' ] ) ;
toc
tic
print( [ 'ImageTest3' ],'-djpeg') ;
toc
tic
print( [ 'ImageTest4' ],'-djpeg','-r100') ;
toc
tic
print( [ 'ImageTest5' ],'-dpng') ;
toc
tic
print( [ 'ImageTest6' ],'-dpng','-r100') ;
toc
経過時間は 0.436288 秒です。
経過時間は 0.390027 秒です。
経過時間は 0.347835 秒です。
経過時間は 0.239091 秒です。
経過時間は 0.393254 秒です。
経過時間は 0.252771 秒です。
Respuesta aceptada
Más respuestas (1)
Kazutoshi Ishioka
el 10 de Mzo. de 2020
0 votos
Categorías
Más información sobre 印刷と保存 en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!