Electron energy-loss spectroscopy and energy-dispersive X-ray spectroscopy are two of the most common means for chemical analysis in the scanning transmission electron microscope. The marked progress of the instrumentation hardware has made chemical analysis at atomic resolution readily possible nowadays. However, the acquisition and interpretation of atomically resolved spectra can still be problematic due to image distortions and poor signal-to-noise ratio of the spectra, especially for investigation of energy-loss near-edge fine structures. By combining multi-frame spectrum imaging and automatic energy-offset correction, we developed a spectrum imaging technique implemented into customized DigitalMicrograph scripts for suppressing image distortions and improving the signal-to-noise ratio. With practical examples, i.e. SrTiO3 bulk material and Sr-doped La2CuO4 superlattices, we demonstrate the improvement of elemental mapping and the EELS spectrum quality, which opens up new possibilities for atomically resolved EELS fine structure mapping.