Transform coding using the discrete cosine transform (DCT) has been widely used in image and video coding standards, but at low bit rates, the coded images suffer from severe visual distortions which prevent further bit reduction. Postprocessing can reduce these distortions and alleviate the conflict between bit rate reduction and quality preservation. Viewing postprocessing as an inverse problem, we propose to solve it by the maximum a posteriori criterion. The distortion caused by coding is modeled as additive, spatially correlated Gaussian noise, while the original image is modeled as a high order Markov random field based on the fields of experts framework. Experimental results show that the proposed method, in most cases, achieves higher PSNR gain than other methods and the processed images possess good visual quality. In addition, we examine the noise model used and its parameter setting. The noise model assumes that the DCT coefficients and their quantization errors are independent. This assumption is no longer valid when the coefficients are truncated. We explain how this problem can be rectified using the current parameter setting.