A method for adaptive chroma reshaping of a high dynamic range image with a processor, the method comprising: accessing with the processor an HDR input image comprising pixel values in a luma component and one or more chroma components; obtaining a reference reshaping function mapping luma pixel values into reference chroma scale factors; for a chroma component of the HDR input image: accessing the pixel values of either the luma component of the HDR input image or a reshaped luma component of the HDR input image, as input luma pixel values; dividing the range of input luma values into two or more bins; assigning the input luma pixel values to the two or more bins; generating for each bin a maximal scale factor based on the chroma pixel values corresponding to the input luma pixel value in each bin, by computing a t th -percentile value of a function of the chroma values in the bin or computing the product of a weighting factor and the maximum of said function of the chroma values in the bin; generating a forward reshaping function by adjusting the reference reshaping function using the maximal scale factors, the forward reshaping function mapping input luma pixel values to forward chroma scale factors; and generating reshaped chroma pixel values for the chroma component by scaling each chroma pixel value by a scale factor obtained by applying the forward reshaping function to the corresponding input luma pixel value. accessing with the processor an HDR input image comprising pixel values in a luma component and one or more chroma components; obtaining a reference reshaping function mapping luma pixel values into reference chroma scale factors; for a chroma component of the HDR input image: accessing the pixel values of either the luma component of the HDR input image or a reshaped luma component of the HDR input image, as input luma pixel values; dividing the range of input luma values into two or more bins; assigning the input luma pixel values to the two or more bins; generating for each bin a maximal scale factor based on the chroma pixel values corresponding to the input luma pixel value in each bin, by computing a t th -percentile value of a function of the chroma values in the bin or computing the product of a weighting factor and the maximum of said function of the chroma values in the bin; generating a forward reshaping function by adjusting the reference reshaping function using the maximal scale factors, the forward reshaping function mapping input luma pixel values to forward chroma scale factors; and generating reshaped chroma pixel values for the chroma component by scaling each chroma pixel value by a scale factor obtained by applying the forward reshaping function to the corresponding input luma pixel value. dividing the range of input luma values into two or more bins; assigning the input luma pixel values to the two or more bins; generating for each bin a maximal scale factor based on the chroma pixel values corresponding to the input luma pixel value in each bin, by computing a t th -percentile value of a function of the chroma values in the bin or computing the product of a weighting factor and the maximum of said function of the chroma values in the bin; generating a forward reshaping function by adjusting the reference reshaping function using the maximal scale factors, the forward reshaping function mapping input luma pixel values to forward chroma scale factors; and generating reshaped chroma pixel values for the chroma component by scaling each chroma pixel value by a scale factor obtained by applying the forward reshaping function to the corresponding input luma pixel value.