We demonstrate a technique of hyperspectral imaging in stimulated Raman scattering (SRS) microscopy using a tunable optical filter, whose transmission wavelength can be varied quickly by a galvanometer mirror. Experimentally, broadband Yb fiber laser pulses are synchronized with picosecond Ti:sapphire pulses, and then spectrally filtered out by the filter. After amplification by fiber amplifiers, we obtain narrowband pulses with a spectral width of <3.3 cm(-1) and a wavelength tunability of >225 cm(-1). By using these pulses, we accomplish SRS imaging of polymer beads with spectral information.