frames2gif

版本 1.0.0.0 (1.8 KB) 作者: Paxon Frady
Converts frames captured by getframes to an animated gif.
275.0 次下载
更新时间 2012/7/17

查看许可证

If you want to make an animated GIF from matlab its a pain. But there is a way to do it. With this function you can make your movie in for loop, and then get each frame with getframe. Then send that through frames2gif and you'll get an animated gif out. The function is pretty simple, it's just a bit tricky.

fh = figure();
for i = 1:num_frames
% Draw a frame on the figure.
frames(i) = getframe(fh);
end
frames2gif('my_movie.gif', frames, 'DelayTime', 0, 'LoopCount', Inf); % For a looping gif.

引用格式

Paxon Frady (2024). frames2gif (https://www.mathworks.com/matlabcentral/fileexchange/37529-frames2gif), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2010a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Animation 的更多信息
标签 添加标签
致谢

启发作品: gif

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0