How can I set up parameters DelayTime and Loopcount when using exportgraphics for producing a gif file?
29 ビュー (過去 30 日間)
古いコメントを表示
I am trying to create a gif file using exprtgraphics. When I use
exportgraphics(gcf, filename, Append = true, DelayTime = 0.4)
I get an error: "Error using exportgraphics Illegal option 'delaytime' given." The same happens if I try to set Loopcount. I couldn't find an example or explanation in the MathWorks documents. I tried the "old way"
frame = getframe(gcf);
im = frame2im(frame);
[imind,cmf] = rgb2ind(im,256);
imwrite(imind,cmf,filename,'gif','WriteMode','append', 'DelayTime',0.4);
This works but the exportgraphics command is easier to use and makes a prettier gif.
So, how can I set up the parameters in exportgraphics?
0 件のコメント
回答 (2 件)
Richard Quist
2022 年 8 月 26 日
@Ludmila Kuncheva - those options are not available with exportgraphics (you can find the documentation for exportgraphics here). You may wish to contact support to request an enhancement
0 件のコメント
Michael Habermann
2023 年 2 月 9 日
編集済み: DGM
2023 年 2 月 9 日
You can use imwrite which supports both settings:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Printing and Saving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!