A method of processing an input image to obtain an output image, wherein the input image has pixels which have input luminances which fall within a first luminance dynamic range (DR_1), which first luminance dynamic range has a first maximum luminance (PL_V_HDR), wherein a reference luminance mapping function (F_L) is received as metadata associated with the input image, wherein the reference luminance mapping function specifies a relationship between luminances of collocated pixels in two images, which two images are differently graded in that pixel luminances of a same image object have different pixel luminances in the two images, wherein the reference luminance mapping function specifies a relationship between luminances of the input image and luminances of a secondary reference image which has a second reference maximum luminance (PL_V_SDR), wherein the output image has an output maximum luminance (PL_V_MDR) which is different from the first maximum luminance and from the second reference maximum luminance (PL_V_SDR); wherein the processing comprises determining an adapted luminance mapping function (FL_DA) which is based on the reference luminance mapping function (F_L) and an adjusted maximum luminance value (PL_V_CO), wherein the adjusted maximum luminance value (PL_V_CO) is different from the output maximum luminance (PL_V_MDR), and applying the adapted luminance mapping function (FL_DA) to the input pixel luminances, to obtain output luminances of the output image, wherein the calculation of the adapted luminance mapping function (FL_DA) involves finding a position (pos) on a metric which specifies positions of maximum luminances, which position corresponds to the adjusted maximum luminance value (PL_V_CO), wherein a first endpoint of the metric corresponds to the first maximum luminance (PL_V_HDR) and a second endpoint of the metric corresponds to second reference maximum luminance (PL_V_SDR), wherein the first endpoint of the metric is collocated, for any normalized input luma (Yn_CC0), on a point on a diagonal which has its horizontal and vertical coordinate equal to that normalized input luma, wherein the second endpoint is located on the locus of the reference luminance mapping function (F_L), as determined by an orientation of the metric; characterized in that the adjusted maximum luminance value (PL _V_CO) is determined by: - obtaining a user correction value (UCBVal); - determining the adjusted maximum luminance value (PL_V_CO) as the result of subtracting user correction value (UCBVal) from the output maximum luminance (PL_V_MDR); writing the output luminances as pixel colors in the output image and outputting the output image. wherein the input image has pixels which have input luminances which fall within a first luminance dynamic range (DR_1), which first luminance dynamic range has a first maximum luminance (PL_V_HDR), wherein a reference luminance mapping function (F_L) is received as metadata associated with the input image, wherein the reference luminance mapping function specifies a relationship between luminances of collocated pixels in two images, which two images are differently graded in that pixel luminances of a same image object have different pixel luminances in the two images, wherein the reference luminance mapping function specifies a relationship between luminances of the input image and luminances of a secondary reference image which has a second reference maximum luminance (PL_V_SDR), wherein the output image has an output maximum luminance (PL_V_MDR) which is different from the first maximum luminance and from the second reference maximum luminance (PL_V_SDR); wherein the processing comprises determining an adapted luminance mapping function (FL_DA) which is based on the reference luminance mapping function (F_L) and an adjusted maximum luminance value (PL_V_CO), wherein the adjusted maximum luminance value (PL_V_CO) is different from the output maximum luminance (PL_V_MDR), and applying the adapted luminance mapping function (FL_DA) to the input pixel luminances, to obtain output luminances of the output image, wherein the calculation of the adapted luminance mapping function (FL_DA) involves finding a position (pos) on a metric which specifies positions of maximum luminances, which position corresponds to the adjusted maximum luminance value (PL_V_CO), wherein a first endpoint of the metric corresponds to the first maximum luminance (PL_V_HDR) and a second endpoint of the metric corresponds to second reference maximum luminance (PL_V_SDR), wherein the first endpoint of the metric is collocated, for any normalized input luma (Yn_CC0), on a point on a diagonal which has its horizontal and vertical coordinate equal to that normalized input luma, wherein the second endpoint is located on the locus of the reference luminance mapping function (F_L), as determined by an orientation of the metric; characterized in that the adjusted maximum luminance value (PL _V_CO) is determined by: - obtaining a user correction value (UCBVal); - determining the adjusted maximum luminance value (PL_V_CO) as the result of subtracting user correction value (UCBVal) from the output maximum luminance (PL_V_MDR); - obtaining a user correction value (UCBVal); - determining the adjusted maximum luminance value (PL_V_CO) as the result of subtracting user correction value (UCBVal) from the output maximum luminance (PL_V_MDR); writing the output luminances as pixel colors in the output image and outputting the output image.