An enhancement to Dixon's technique is described which can provide error-free decomposition of water and fat proton images even in the presence of off-resonance conditions which result from susceptibility differences, demagnetization, or shim errors. The method uses three measurements with phase shifts of 0, pi, and -pi between the fat and water resonances. The additional information provided by the third measurement is used to calculate an image of the field inhomogeneity in addition to true water and fat images. The signal-to-noise ratio (SNR) in the decomposed images is equivalent to that of a 2.7 NEX acquisition (instead of 3 NEX), yielding an SNR imaging efficiency of 95%. In addition, the B0 image which is provided may have diagnostic value in its own right. Examples of head and body scans often portray surprisingly large B0 shifts near interfaces between air or bone and soft tissue.