Full field X-ray spectroscopy imaging in NSLS-II will provide unprecedented insights into 2D/3D chemical compositions of nanomaterials. Spectra fitting which decomposes the experimental spectra data into chemical compositions plays a key role in the technique. Existing fitting methods including Brute Force (BF) and Constrained Least Square Fitting (CLSF) rest upon fitting fractions and suffer two problems: 1) loss of the thickness information; 2) demands for filtering. In this paper, we propose a new fitting method Non-Negative Least Square Fitting (NNLSF), which directly fit thicknesses instead of fractions. Our experiments in both simulation and real datasets show that, NNLSF 1) provides more information in fitting results than current approaches, 2) saves the efforts of filtering, and also 3) is 6∼96 times faster than alternatives. All the methods (BF, CLSF, NNLSF) were implemented as open-source software with a friendly GUI.