Showing GIF images in GUI

I have gif images which are all black and white and I am trying to show them using this code:
for j=1:12
[I cmap] = imread(strcat(path,filename),'frames','all');
subplot(4,3,j)
image(I);
colormap(cmap);
axis off;
axis image;
end
For some images it works but for some displays only black picture
ALL IMAGES ARE BLACK AND WHITE AND IN .GIF FORMAT
If someone knows where is the problem help me please

2 Comments

What MATLAB version are you using?
R2014b

Sign in to comment.

 Accepted Answer

for j=1:12
[I cmap] = imread(strcat(path,filename),'frames','all');
ax = subplot(4,3,j);
image(I);
colormap(ax,cmap);
axis off
axis image
end
Starting 14b, you can have a separate colormap for each axes, so try this.

1 Comment

you're helping me so much...thank you :)

Sign in to comment.

More Answers (0)

Tags

Asked:

on 30 Dec 2014

Commented:

on 30 Dec 2014

Community Treasure Hunt

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

Start Hunting!