The signal-to-noise ratio (SNR) in x-ray imaging can be increased using a photon counting detector which could allow for rejecting electronics noise and for weighting x-ray photons according to their energies. This approach, however, was not feasible for a long time because photon counting x-ray detectors with very high count rates, good energy resolution and a large number of small pixels were required. These problems have been addressed with the advent of new detector materials, fast readout electronics and powerful computers. In this work, we report on the experimental evaluation of projection x-ray imaging with a photon counting cadmium–zinc–telluride (CZT) detector with energy resolving capabilities. The detector included two rows of pixels with 128 pixels per row with 0.9 × 0.9 mm2 pixel size, and a 2 Mcount pixel−1 s−1 count rate. The x-ray tube operated at 120 kVp tube voltage with 2 mm Al-equivalent inherent filtration. The x-ray spectrum was split into five regions, and five independent x-ray images were acquired at a time. These five quasi-monochromatic x-ray images were used for x-ray energy weighting and material decomposition. A tissue-equivalent phantom was used including contrast elements simulating adipose, calcifications, iodine and air. X-ray energy weighting improved the SNR of calcifications and iodine by a factor of 1.32 and 1.36, respectively, as compared to charge integrating. Material decomposition was performed by dual energy subtraction. The low- and high-energy images were generated in the energy ranges of 25–60 keV and 60–120 keV, respectively, by combining five monochromatic image data into two. X-ray energy weighting was applied to low- and high-energy images prior to subtraction, and this improved the SNR of calcifications and iodine in dual energy subtracted images by a factor of 1.34 and 1.25, respectively, as compared to charge integrating. The detector energy resolution, spatial resolution, linearity, count rate, noise and image uniformity were investigated. The limitations of this technology were emphasized and possible solutions were discussed.