The subtraction method has been proposed to improve resolution and contrast in confocal scanning fluorescent microscopy. In this paper, we propose applying the subtraction method based on the use of rotating two different asymmetric phase masks along three directions to extend the depth of field. The combining optical transfer function is generated by using three subtraction optical transfer functions. The proposed method can produce high-quality image, in which the digital processing by a deconvolution filter absents. A square root phase mask is used to demonstrate the proposed concept. Compared with the traditional imaging system with the clear aperture, the subtraction method can be used to attain sharp and invariant image over a wide range of defocus.