What part of complex number of inverse discrete Fourier transform?
To apply IFFT you need back the signal do complex numbers, you need use magnitude and phase information to rebuild correctly.

The real part is = magnitude * cos(phase)

The imaginary part is = magnitude * sin(phase)

You can use square roots of −1 (sqrt(-1)) to get Imaginary unit.

Now multiply imaginary unit with imaginary part and sum with real part, OK now are you done to apply IFFT !

At the end I apply a mat2gray function to convert the matrix to the intensity!

here how it is really done in matlab: 

x=imread('C:\Users\Eder\Pictures\download.jpg');
figure(1);imshow(x);
%Make FFT
y=fft(x);
%Amplitude of the FFT
mx=abs(y);
%get Phase Information
ma=angle(y);
%back the signal to complex
y2= mx .* ( cos(ma) + sqrt(-1) * sin(ma) );
%Apply Inverse FFT
x2=real(ifft(y2));
result=mat2gray(x2);
figure(2);imshow(result);