An X-ray imaging apparatus and a method of operating the X-ray imaging method are provided. The X-ray imaging apparatus includes a first panel configured to contact an object an X-ray generator configured to maintain a uniform distance with the first panel and configured to generate an X-ray a second panel facing the first panel and configured to contact the object and an X-ray detector configured to detect the X-ray transmitted to the object.