A method to map using a processor an image from a first dynamic range to a second dynamic range, the method comprising: accessing first information data comprising a black point level, a mid-tones level, and a white point level in the first dynamic range; accessing second information data comprising a black point level and a white point level in the second dynamic range; determining a first and a second bounding value for a mid-tones level in the second dynamic range based on the second information data and a desired range of constant brightness, wherein the desired range of constant brightness is given by a percentage threshold above minimum brightness and a percentage threshold below maximum brightness; determining the mid-tones level in the second dynamic range based on the first and second information data, the first and second bounding values, and a mapping function using a piecewise linear mapping or a continuous function mapping for a mapping from the mid-tones level in the first dynamic range to the mid-tones level in the second dynamic range, wherein the mapping function comprises a linear central segment with a slope of 1 in the log domain between the first and the second bounding value, wherein the first and the second bounding value represent values of the range between the black point level and the white point level in the second dynamic range; determining a parametrized sigmoid transfer function to map pixel values of the input image in the first dynamic range to corresponding pixel values of an output image in the second dynamic range, wherein the transfer function comprises three anchor points, wherein the first anchor point is determined using the black point levels in the first and second dynamic ranges (x1, y1), the second anchor point is determined using the white point levels in the first and second dynamic ranges (x3, y3), and the third anchor point is determined using the mid-tones levels of the first and second dynamic ranges (x2, y2); and mapping the input image to the output image using the determined transfer function. accessing first information data comprising a black point level, a mid-tones level, and a white point level in the first dynamic range; accessing second information data comprising a black point level and a white point level in the second dynamic range; determining a first and a second bounding value for a mid-tones level in the second dynamic range based on the second information data and a desired range of constant brightness, wherein the desired range of constant brightness is given by a percentage threshold above minimum brightness and a percentage threshold below maximum brightness; determining the mid-tones level in the second dynamic range based on the first and second information data, the first and second bounding values, and a mapping function using a piecewise linear mapping or a continuous function mapping for a mapping from the mid-tones level in the first dynamic range to the mid-tones level in the second dynamic range, wherein the mapping function comprises a linear central segment with a slope of 1 in the log domain between the first and the second bounding value, wherein the first and the second bounding value represent values of the range between the black point level and the white point level in the second dynamic range; determining a parametrized sigmoid transfer function to map pixel values of the input image in the first dynamic range to corresponding pixel values of an output image in the second dynamic range, wherein the transfer function comprises three anchor points, wherein the first anchor point is determined using the black point levels in the first and second dynamic ranges (x1, y1), the second anchor point is determined using the white point levels in the first and second dynamic ranges (x3, y3), and the third anchor point is determined using the mid-tones levels of the first and second dynamic ranges (x2, y2); and mapping the input image to the output image using the determined transfer function.