Silicon CCDs are used for X-ray imaging in fields as dentistry and materials testing. Due to the low X-ray absorption in silicon the CCD is generally coated with a scintillating layer. In order to evaluate the response for different combinations of scintillator material, scintillator geometry and detector we have developed a simulation program. The program calculates the signal to noise ratio and spatial resolution based on both the signal from the scintillating layer and the signal from direct detection of X-rays in the detector. Results obtained with this program indicate that the signal to noise ratio in the system is optimized by using a scintillator with high X-ray absorption and high light output while minimizing the signal from direct detection in the CCD. The spatial resolution can be increased by defining pixels in the scintillator.