1. A method of phase imaging, comprising: providing a source ( 2 ) of X-rays; directing the source ( 2 ) of X-rays to define at least one X-ray beam with opposed first and second edges; passing the at least one X-ray beam through a sample region of a sample onto an X-ray detector having pixels or rows of pixels corresponding to the at least one X-ray beam; obtaining a first image in a first configuration wherein the at least one X-ray beam includes at least one first X-ray beam where the first edge but not the second edge of each first X-ray beam overlaps the corresponding pixel or row of pixels in the X-ray detector and obtaining a second image in a second configuration wherein the at least one X-ray beam includes at least one second X-ray beam where the second edge but not the first edge of each second X-ray beam overlaps the corresponding pixel or row of pixels in the X-ray detector to obtain a second X-ray image; and obtaining a phase image from the first and second X-ray images by taking the difference between the first and second X-ray images.