1. An image prediction method comprising: receiving a first image and a second image, wherein the second image has different dynamic range than the first image; receiving metadata related to a color grading process, wherein the color grading process is used to derive the second image from the first image, wherein the metadata that relates to the color grading process comprise a color transformation matrix M and at least one of slope S, offset O, and power P parameters of a non-linear function; applying said first image and second said image into an inverse color grading prediction process to compute an output image that represents the predicted value of the first image, wherein the inverse color grading prediction process comprises a non-linear prediction process which includes the at least one of the slope S, offset O, and power P parameters and is related to the color transformation matrix M; and outputting the output image.