We present a novel design of a quadratic filter (QF) in order to improve the quality of contrast-assisted ultrasound images for medical diagnosis. The design of QFs for capturing the second order nonlinearities is performed in frequency domain. The two-dimensional (2D) frequency response of the optimum quadratic filter is composed of two 2D Gaussian functions with different spreads in their major and minor axes. The centers of the Gaussian functions are positioned at frequency pairs where the contrast-to-tissue (CTR) ratio is maximal along the main diagonal of 2D frequency plane. Subsequently, the bandwidth of filter is independently determined to optimize spatial resolution. Therefore, the new design approach offers two degrees of freedom in maximizing the CTR and spatial resolution simultaneously. This avoids the inherent tradeoff between contrast and spatial resolution when linear filters are used (e.g. in second harmonic imaging). We demonstrate the performance of the new approach with echo data from a flow phantom.