A luminance processor arranged to calculate an output luminance of a pixel of an output image (Im_LDR; Im3000nit) having a second luminance dynamic range characterized by a second peak brightness (PB_LDR; PB_MDR) from an input luminance (L) of an input color of a spatially collocated pixel of an input image (MAST _HDR) having a first luminance dynamic range characterized by a first peak brightness (PB HDR), characterized in that the luminance processor comprises: - a gain calculation unit arranged to calculate a multiplication factor (gL) which multiplication factor is defined for the input luminance of any input color of an image pixel of the input image based on a luminance mapping function (FLM) indicating how to adjust the input luminance to become a corresponding intermediate output luminance, by calculating the multiplication factor as the division of an output of the luminance mapping function for the input luminance divided by that input luminance: gL=FLM(L)/L; - a gamut overflow calculator arranged to calculate an overflow measure (T) being a multiplication of a maximum of a linear red, green and blue color component of the input color by the multiplication factor (gL); - a gain factor modification unit arranged to determine a lower alternative gain factor (F1(gL)) in case the overflow measure is larger than a threshold (G), and arranged to keep the multiplication factor (gL) otherwise, and arranged to output as a final gain factor (gF) the lower alternative gain factor (F1(gL)) in case the overflow measure is larger than the threshold (G) or the multiplication factor (gL) otherwise; and - a multiplier to multiply the respective components of the input color (R'G'B'_nrm) by the final gain factor (gF) to obtain the respective components of the output color (R'G'B'_HDR) which has the output luminance. - a gain calculation unit arranged to calculate a multiplication factor (gL) which multiplication factor is defined for the input luminance of any input color of an image pixel of the input image based on a luminance mapping function (FLM) indicating how to adjust the input luminance to become a corresponding intermediate output luminance, by calculating the multiplication factor as the division of an output of the luminance mapping function for the input luminance divided by that input luminance: gL=FLM(L)/L; - a gamut overflow calculator arranged to calculate an overflow measure (T) being a multiplication of a maximum of a linear red, green and blue color component of the input color by the multiplication factor (gL); - a gain factor modification unit arranged to determine a lower alternative gain factor (F1(gL)) in case the overflow measure is larger than a threshold (G), and arranged to keep the multiplication factor (gL) otherwise, and arranged to output as a final gain factor (gF) the lower alternative gain factor (F1(gL)) in case the overflow measure is larger than the threshold (G) or the multiplication factor (gL) otherwise; and - a multiplier to multiply the respective components of the input color (R'G'B'_nrm) by the final gain factor (gF) to obtain the respective components of the output color (R'G'B'_HDR) which has the output luminance. <EOS>