For correcting differential phase image data 52, differential phase image data 52 acquired with radiation at different energy levels is received, wherein the differential phase image data 52 comprises pixels 60, each pixel 60 having a phase gradient value 62a, 62b, 62c for each energy level. After that an energy dependent behavior of phase gradient values 62a, 62b, 62c of a pixel 60 is determined and a corrected phase gradient value 68 for the pixel 60 is determined from the phase gradient values 62a, 62b, 62c of the pixel 60 and a model for the energy dependence of the phase gradient values 62a, 62b, 62c.