MATLAB: Save resize images to a folder

Image Processing Toolboxresizesave images

I read into mathLab a folder of images that contained apples. I resized them and I am trying to save them into another folder. How can I do so?

Best Answer

Right after you call imresize() make up the output filename and call imwrite():
fullOutputFileName = fullfile(OutputFolder1, filenames(n).name);
imwrite(rez1, fullOutputFilename);