A method for generating single channel prediction metadata for rendering a predicted high dynamic range, HDR, image from a standard dynamic range, SDR, image, such that a decoder can subsequently render the predicted HDR image by using the single channel prediction metadata to reconstruct a backward reshaping function for transforming at least one color channel of the SDR image to a corresponding at least one color channel of the predicted HDR image, the method comprising: receiving image content, said image content being received in both an SDR representation and an HDR representation; accessing a pre-reshaping function for scaling at least one color channel of the SDR representation, wherein the pre-reshaping function scales an input range, being the range of codewords of the at least one color channel of the SDR representation, to the entire SDR codeword range; applying the pre-reshaping function to the at least one color channel of the SDR representation to obtain at least one pre-reshaped color channel for transmission to the decoder; determining a first mapping function for mapping input codewords to output codewords, comprising: generating a first and a second cumulative distribution functions (CDFs) representing the cumulative distribution of codewords of the at least one color channel of the SDR representation and the cumulative distribution of codewords of the corresponding at least one color channel of the HDR representation respectively, wherein the first and second CDFs associate each codeword with a corresponding CDF value; and applying a cumulative distribution function matching based on the first and the second CDFs, comprising matching each codeword of the first CDF to a codeword of the second CDF that has a CDF value that matches the CDF value of said codeword of the first CDF, wherein the codewords of the first CDF define the input codewords of the first mapping function and the matched codewords of the second CDF define the output codewords of the first mapping function; determining the backward reshaping function by function decomposition of H = T(F(b)) wherein H represents the determined first mapping function, T represents the backward reshaping function to be determined by the decomposition, F represents the pre-reshaping function and b represents input of the pre-reshaping function; and generating the single channel prediction metadata representative of the backward reshaping function. receiving image content, said image content being received in both an SDR representation and an HDR representation; accessing a pre-reshaping function for scaling at least one color channel of the SDR representation, wherein the pre-reshaping function scales an input range, being the range of codewords of the at least one color channel of the SDR representation, to the entire SDR codeword range; applying the pre-reshaping function to the at least one color channel of the SDR representation to obtain at least one pre-reshaped color channel for transmission to the decoder; determining a first mapping function for mapping input codewords to output codewords, comprising: generating a first and a second cumulative distribution functions (CDFs) representing the cumulative distribution of codewords of the at least one color channel of the SDR representation and the cumulative distribution of codewords of the corresponding at least one color channel of the HDR representation respectively, wherein the first and second CDFs associate each codeword with a corresponding CDF value; and applying a cumulative distribution function matching based on the first and the second CDFs, comprising matching each codeword of the first CDF to a codeword of the second CDF that has a CDF value that matches the CDF value of said codeword of the first CDF, wherein the codewords of the first CDF define the input codewords of the first mapping function and the matched codewords of the second CDF define the output codewords of the first mapping function; generating a first and a second cumulative distribution functions (CDFs) representing the cumulative distribution of codewords of the at least one color channel of the SDR representation and the cumulative distribution of codewords of the corresponding at least one color channel of the HDR representation respectively, wherein the first and second CDFs associate each codeword with a corresponding CDF value; and applying a cumulative distribution function matching based on the first and the second CDFs, comprising matching each codeword of the first CDF to a codeword of the second CDF that has a CDF value that matches the CDF value of said codeword of the first CDF, wherein the codewords of the first CDF define the input codewords of the first mapping function and the matched codewords of the second CDF define the output codewords of the first mapping function; determining the backward reshaping function by function decomposition of H = T(F(b)) wherein H represents the determined first mapping function, T represents the backward reshaping function to be determined by the decomposition, F represents the pre-reshaping function and b represents input of the pre-reshaping function; and generating the single channel prediction metadata representative of the backward reshaping function.