Gamma decay of isoscalar and isovector giant resonances following heavy-ion inelastic scattering