In this article, effective point spread functions for fluorescence microscopic imaging are introduced to investigate the effects of scattering particle size and optical gating on image resolution under single-photon (1p) and two-photon (2p) excitation. The dependence of image resolution on these effects shows a deeper penetration depth under 2p excitation due to the use of a longer illumination wavelength and the nonlinear dependence of the fluorescence on excitation intensity. The fundamental difference between 1p and 2p fluorescence imaging is that 1p fluorescence imaging mainly depends on the fluorescence light excited by scattered photons, in which case the penetration depth is limited by the degradation in image resolution. However, 2p fluorescence imaging is determined by the fluorescence light excited by ballistic photons, in which case the penetration depth is limited by the loss in signal strength. The results also reveal that the pinhole gating method is efficient in 1p fluorescence imaging, but exhibits a limited influence on 2p fluorescence imaging. It is also demonstrated that in 2p fluorescence imaging, a high numerical aperture objective gives a strong signal while retains an image of high resolution if the turbid medium is not so thick.