%% Resize RGB Image Specifying Size of Output Image
% Read an RGB image into the workspace.

RGB = imread('peppers.png');

%
% Resize the RGB image to have 64 rows. imresize calculates the number of columns automatically.

RGB2 = imresize(RGB,[64 NaN]);

% Get the size of the resized image.

sz = size(RGB2)

%
% Display the original image and the resized image.

imshow(RGB)
title("Original Image")
imshow(RGB2)
title("Resized Image with 64 Rows")

% Copyright 2012 The MathWorks, Inc.