A new effective algorithm of impulse noise suppression is proposed. Conventional filtering schemes usually utilize a fixed shape for the moving window, such as a rectangle or circle. In contrast, the proposed algorithm exploits a signal-dependent shape for the moving window. We suggest a simple adaptive algorithm of impulse noise detection in monochrome images that takes into account the size of signal gradient neighborhoods and image statistics. Experimental results show superior performance of the proposed algorithm compared to that of conventional algorithms in terms of both subjective and objective criteria.