You should avoid naming a variable input, as that is the name of a key MATLAB function to request input from the user.
reshape() can never change the pixel values. The particular way you use reshape would result in the pixel values being listed across rows first, all of first row, then all of second row, and so on.