1. An X-ray apparatus comprising: a source configured to emit X-rays to an object; a detector configured to detect the X-rays that have passed through the object; an arm movably attached to a stand and configured to move the source and the detector for obtaining a plurality of images of respective portions of the object; and a processor configured to image a first portion of the respective portions of the object, based on the X-rays detected by the detector to obtain a first image of the plurality of images, control the arm to rotate, image a second portion of the respective portions, based on the X-rays detected by the detector to obtain a second image of the plurality of images after the arm has rotated, generate the first image and the second image, adjust an enlargement ratio or a reduction ratio of at least one among the first image and the second image, based on a distance from the object to the detector when imaging each of the first image and the second image, and generate an X-ray stitching image by stitching the first image and the second image, one of the first image and the second image having the adjusted enlargement ratio or the adjusted reduction ratio.