Difference between 2D DFT's and 1D DFT's of Linearized Matrices
The DFT is "Separable Operator" (Also the classic Fourier Transform) and hence can be applied on the Rows and Columns of the image separately (It can be generalized to N dimension and not only 2).
Yet, if you create  1D signal from your image (Let's say by Column Stack) and apply 1D DFT you don't get the information you would by using 2D DFT (By going on the Row and them Columns).  

Remember, Fourier Transform is all about synthesizing the signal using different functions. In this case if it is 2D signal you want to build it using 2D Signals.

You need to play with the indices to first apply it on each row and later on each column.