A method of adjusting a TRC of an image is provided. The method involves
receiving an image at an input resolution, resampling the image to a
processing resolution if the imput resolution and the processing
resolution are not same, processing the image using rank-ordered error
diffusion, and resampling the processed image to a desired output
resolution for the image if the processing resolution and the output
resolution are not same.