figureの画像ファイル保存を高速に実施したい
Show older comments
お世話になります
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 秒です。
Accepted Answer
More Answers (1)
Kazutoshi Ishioka
on 10 Mar 2020
0 votes
Categories
Find more on 印刷と保存 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!