I have the DFT of a picture and I need to set its magnitude and its phase to zero, separately.
Also if the magnitude of an image is 0 it will appear entirely as black, right?
You're mistakenly assuming that there is such a thing as the phase and the magnitude. Each spatial frequency has a phase and magnitude, that's why you get one complex number per frequency.
And an image is black when all magnitudes are zero.