NumberOfimages=4; %chose the number of images you want to give input
prefix_image='data ('; %change the desired input image name here only
fileformat=').tif'; %change the desired input image format here only
for num=1:NumberOfimages I = imread(strcat(prefix_image,num2str(num),fileformat)); fileName = sprintf('C:\\result\\%02d',num); imwrite (I, 'fileName', 'jpg');end
i tried this code in order to read and save images,although the reading part worked well,the saving part doesn't work,can any one plz help me? my images are: data (1),data (2),…
Best Answer