A grating spectrograph can be used for spectrally selective two-dimensional imaging if it is operated with a broad entrance slit. The resulting intensity distribution in its exit plane is a one-dimensional convolution of the spatial and spectral distributions of incident light. We present a dedicated deconvolution filter to reconstruct the spatial image from the spectrograph output. The algorithm is illustrated on Raman imaging of an underexpanded dry air jet. Recorded Raman images correspond to density maps convolved with the Raman spectrum of air; the latter essentially acts as a blurring function for the density map. The deconvolution filter combines the individual images recorded in the O2 and N2 Raman bands into a single image of relative air density.