When a material is placed along the path of an X-ray beam using a broad range of energy X-ray source, the energy dependence of the attenuation for the X-ray photons will be substantially dissimilar for different materials. The process at which X-ray radiation loses its penetrating strength as it travels through a material will be significantly larger for photons with energy above k-edge energy of that material than for those with slightly lower energy. Hence energy resolved X-ray imaging can be used to achieve colour images revealing the material content of the test sample. The attenuation of the spectrum done by scanning an energy window through the spectrum was measured for a number of samples of different materials. The test samples include Sn, Gd and I with K-edge energy at 29 keV, 50 keV and 33 keV, respectively, using a Feinfocus microfocus X-ray source (FTP-105.02) with Medipix2 photon counting chip.