A new decision-based algorithm is proposed for restoration of images that are highly corrupted by impulse noise. The new algorithm shows significantly better image quality than a standard median filter (SMF), adaptive median filters (AMF), a threshold decomposition filter (TDF), cascade, and recursive nonlinear filters. The proposed method, unlike other nonlinear filters, removes only corrupted pixel by the median value or by its neighboring pixel value. As a result of this, the proposed method removes the noise effectively even at noise level as high as 90% and preserves the edges without any loss up to 80% of noise level. The proposed algorithm (PA) is tested on different images and is found to produce better results in terms of the qualitative and quantitative measures of the image