# MATLAB: How to resize a rectangular image of size 1280×512 to a square image of size (2048×2048)? I have used the following code. Is it correct or is there any other better methods to perform resizing

image resizing

% First read the image I of size (1280x512) using imread, then used imresize to change the size of I to (2048x2048) and used imwrite to save the imageI=imread('I.tif');J=imresize(I,[2048 2048],'bicubic');imwrite(J,'J.tif','tiff');