A highly accurate reproduction of visual intensity and contrast rather than the conventional 8-bit color depth is more and more used, motivating the development of an enhanced dynamic range called high bit-depth. A method for encoding a first, low bit-depth image of M bit RGB pixels and a second, high bit-depth video image of N bit RGB pixels, M<N, both having same spatial resolution, comprises generating a first transfer function based on color histograms of the first and the second video image, generating a second transfer function based on the first transfer function, applying the second transfer function to the first video image, wherein a transformed first video image is generated, calculating and encoding the residual, encoding the first video image and transmitting the encoded first video image, the second transfer function and the encoded difference.