An X-ray imaging method is for generating contrast-enhanced image data relating to an examination region of an object to be examined. In an embodiment of the method, first contrast-agent influenced measured X-ray projection data with a first X-ray energy spectrum and at least one set of second contrast-agent influenced measured X-ray projection data with a second X-ray energy spectrum are acquired from the examination region. Subsequently, image data assigned to a third X-ray energy spectrum with a third mean energy, based on the first and at least second measured X-ray projection data is reconstructed based on the first and at least second measured X-ray projection data that has been acquired. A mean energy of the first X-ray energy spectrum and a mean energy of the second X-ray energy spectrum are selected as a function of a dimension parameter value of the object that is to be examined.