Imaging Spatial Variations of Optical Bandgaps in Perovskite Solar Cells