imresize
support resize with fixed number of cols and rows: imresize(img, [rows, cols])
. You can use this function variant for second resize.
imageReduced = imresize(imageOriginal, 0.25, 'nearest');
imageGenerated = imresize(imageReduced, size(imageOriginal), 'nearest');