frames2gif

Converts frames captured by getframes to an animated gif.
275 Downloads
Aktualisiert 17. Jul 2012

Lizenz anzeigen

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.

Zitieren als

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

Kompatibilität der MATLAB-Version
Erstellt mit R2010a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Animation finden Sie in Help Center und MATLAB Answers
Tags Tags hinzufügen
Quellenangaben

Inspiriert: gif

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0