frames2gif

Converts frames captured by getframes to an animated gif.

您现在正在关注此提交

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 (2026). frames2gif (https://ww2.mathworks.cn/matlabcentral/fileexchange/37529-frames2gif), MATLAB Central File Exchange. 检索时间: .

致谢

启发作品: gif

类别

Help CenterMATLAB Answers 中查找有关 Animation 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0.0