An important application of spatial filtering techniques is in the postprocessing of images degraded by coding. Linear, space-invariant filters are inadequate to reduce the noise produced by block coders. The noise in block coded images is correlated with the local characteristics of the signal, and such filters are unable to exploit this correlation to reduce the noise. We propose a new nonlinear, space-variant filtering algorithm which smooths jagged edges without blurring them, and smooths out abrupt intensity changes in monotone areas. Edge sharpness is preserved because near edges the filtering of the signal is negligible. Consequently, in-band noise is not reduced, but the well-known masking effect reduces the visibility of this in-band noise. The algorithm is only slightly more complex to implement than simple linear filtering. We present examples of processed images and SNR figures to demonstrate that a significant improvement in subjective and objective quality is achieved. Copyright © 1986 by the Institute of Electrical and Electronics Engineers, Inc.