Code covered by the BSD License  

Highlights from
frames2gif

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 1.76 KB File ID: #37529

frames2gif

by Paxon Frady

 

17 Jul 2012

Converts frames captured by getframes to an animated gif.

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File  
Everyone's Tags
animation, gif
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.

Contact us