Error when trying to display an gif image in matlab

1 view (last 30 days)
i'm tried to display gif image but i got the following error
for k=1:7
[img,map] = imread('animate.gif','frames',k);
save(sprintf('img%d.mat',k),'img');
save('map.mat','map');
figure;
implay(img,map);
end
Error using readgif>read_multiframe_gif (line 70)
Java exception occurred:
java.lang.ArrayIndexOutOfBoundsException
Error in readgif (line 32)
[X,map] = read_multiframe_gif(filename);
Error in imread (line 415)
[X, map] = feval(fmt_s.read, filename, extraArgs{:});

Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!