Why does gif turn into grayscale when i use the imread or the imshow command?

9 views (last 30 days)
I didn't make the animation from mathlab. I downloaded it externally with 6 seconds of animation. Did it ACTUALLY convert my gif into a grayscale or is it just showing in matlab due to some error.
a = imread('gframe.gif');
imshow(a)
Output
  4 Comments
Walter Roberson
Walter Roberson on 27 Sep 2021
[a, cmap] = imread('gframe.tif');
image(a);
colormap(cmap);
Notice that I did not use a variable named colormap as that is the name of the function needed to change the current colormap.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!