This work is concerned with the modification of the gray level or color distribution of digital images. A common drawback of classical methods aiming at such modifications is the revealing of artefacts or the attenuation of details and textures. In this work, we propose a generic filtering method enabling, given the original image and the radiometrically corrected one, to suppress artefacts while preserving details. The approach relies on the key observation that artefacts correspond to spatial irregularity of the so-called transportation map, defined as the difference between the original and the corrected image. The proposed method draws on the nonlocal Yaroslavsky filter to regularize the transportation map. The efficiency of the method is shown on various radiometric modifications: contrast equalization, midway histogram, color enhancement, and color transfer. A comparison with related approaches is also provided.