||We studied the X-ray spectroscopy capability and the detection efficiency of a low cost Commercial Off The Shelf CMOS Image Sensor (CIS) in the energy range from 6.4 to 24.9 keV using the fluorescence spectra emitted by FeNi, Cu, Zr, Pb, and Ag. The obtained results are compared with that obtained using a Silicon Drift Detector (SDD). We conclude that CIS is able to resolve fluorescence lines up to 17.7 keV but with a reduced detection efficiency. At lower energies, the energy resolution of the CIS is comparable to that obtained with the SDD. By the comparison of both detectors we also estimate the detection efficiency of the proposed method and the effective thickness of the CIS for all the measured X-ray lines.