We measured and imaged magnetic field distributions of thin layers (2-D objects with negligible thickness) of biological and physical samples, by using nuclear magnetic resonance (NMR). The image represents the magnetic susceptibility distribution in the sample. We used a standard gradient echo imaging method, susceptible to magnetic field homogeneity, for detection. Since the physical and biological samples we investigated do not generate any NMR signal, we used a homogeneous phantom reference - a container filled with water - as a medium. The image acquired by this method is actually a projection of the sample properties onto the homogeneous phantom. The method can be applied in nanotechnology, microelectronics, and especially in the biological and medical sciences.