Spectral Imaging with a Programmable Light Source