%% Resize Indexed Image
% Read an indexed image into the workspace.

[X,map] = imread("corn.tif");

%
% Increase the size of the indexed image by 50%.

[Y,newmap] = imresize(X,map,1.5);

%
% Display the original image and the resized image.

imshow(X,map)
title("Original Indexed Image and Colormap")
imshow(Y,newmap)
title("Resized Image and Optimized Colormap")

% Copyright 2012 The MathWorks, Inc.