clc;
close all;
clear;
workspace;
fontSize = 20;
[gifImage cmap] = imread('C:\Users\yourname\Pictures\whatever.gif');
subplot(2,3, 1);
imshow(gifImage);
rgbImage = ind2rgb(gifImage, cmap);
title('GIF Image', 'FontSize', fontSize);
set(gcf, 'units','normalized','outerposition',[0 0 1 1]);
subplot(2,3, 2);
imshow(rgbImage);
title('After conversion to RGB', 'FontSize', fontSize);
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
subplot(2,3, 4);
imshow(redChannel);
title('Red Channel', 'FontSize', fontSize);
subplot(2,3, 5);
imshow(greenChannel);
title('Green Channel', 'FontSize', fontSize);
subplot(2,3, 6);
imshow(blueChannel);
title('Blue Channel', 'FontSize', fontSize);
Best Answer