A method of processing an input image to obtain an output image, comprising: obtaining for the pixels of the input image starting lumas (Yn_CC), the starting lumas being related to input luminances (L_in) via an opto-electronic transfer function (OETF_psy); obtaining a minimum luminance of a targeted display (mL VD), the targeted display corresponding to an end-user display, which end-user display is to be supplied with the output image in order to display it; obtaining a minimum luminance of the end-user display (mL_De) in a viewing room, wherein the minimum luminance of the end-user display (mL_De) is dependent on an amount of illumination in the viewing room; calculating a difference (dif) by subtracting the luminance of the end-user display (mL_De) from the minimum luminance of a targeted display (mL_VD); converting the difference (dif) to a luma difference (Ydif) by applying the opto-electronic transfer function (OETF_psy) with the difference as input to the opto-electronic transfer function (OETF_psy), which yields the luma difference as output; mapping the starting lumas by applying a linear function which applies as additive constant the luma difference multiplied by -1.0, and uses the luma difference increased by the value 1.0 as multiplier to multiply by the starting lumas, which yields mapped lumas (Yim); converting the mapped lumas (Yim) by applying the inverse of the opto-electronic transfer function (EOTF_psy) to obtain normalized intermediate luminances (Ln_im); subtracting a second minimum luminance of an end-user display (mL_De2) divided by a maximum luminance of the output image (PL_O) from the intermediate luminances (Ln_im), and scaling the subtraction by 1.0 minus the result of dividing the second minimum luminance of an end-user display (mL_De2) by the maximum luminance of the output image (PL_O), to obtain final normalized luminances (Ln_f); multiplying the final normalized luminances (Ln_f) by the maximum luminance of the output image (PL_O), to obtain output luminances; and outputing the output luminances in a color representation of pixels of the output image. obtaining for the pixels of the input image starting lumas (Yn_CC), the starting lumas being related to input luminances (L_in) via an opto-electronic transfer function (OETF_psy); obtaining a minimum luminance of a targeted display (mL VD), the targeted display corresponding to an end-user display, which end-user display is to be supplied with the output image in order to display it; obtaining a minimum luminance of the end-user display (mL_De) in a viewing room, wherein the minimum luminance of the end-user display (mL_De) is dependent on an amount of illumination in the viewing room; calculating a difference (dif) by subtracting the luminance of the end-user display (mL_De) from the minimum luminance of a targeted display (mL_VD); converting the difference (dif) to a luma difference (Ydif) by applying the opto-electronic transfer function (OETF_psy) with the difference as input to the opto-electronic transfer function (OETF_psy), which yields the luma difference as output; mapping the starting lumas by applying a linear function which applies as additive constant the luma difference multiplied by -1.0, and uses the luma difference increased by the value 1.0 as multiplier to multiply by the starting lumas, which yields mapped lumas (Yim); converting the mapped lumas (Yim) by applying the inverse of the opto-electronic transfer function (EOTF_psy) to obtain normalized intermediate luminances (Ln_im); subtracting a second minimum luminance of an end-user display (mL_De2) divided by a maximum luminance of the output image (PL_O) from the intermediate luminances (Ln_im), and scaling the subtraction by 1.0 minus the result of dividing the second minimum luminance of an end-user display (mL_De2) by the maximum luminance of the output image (PL_O), to obtain final normalized luminances (Ln_f); multiplying the final normalized luminances (Ln_f) by the maximum luminance of the output image (PL_O), to obtain output luminances; and outputing the output luminances in a color representation of pixels of the output image.