An X-ray imaging apparatus includes a table, an imager configured to capture a plurality of X-ray images, a rotating mechanism, a moving mechanism, and an image processor. The image processor is configured to generate a long image by performing processing of varying magnifications of the plurality of X-ray images based on an amount of relative movement of the table and the imager and splicing the plurality of X-ray images when imaging is performed at a plurality of imaging positions in a state in which an optical axis of X-rays radiated from an X-ray irradiator is inclined with respect to the table.