Electrical spin injection in a narrow  In0.2Ga0.8As quantum well in a GaAs p-i-n optical device is reported. The quantum well is located 300 nm from an AlGaAs Schottky barrier and this system is used to compare the efficiencies and temperature dependences of spin injection from Fe and the Heusler alloy Co2.4Mn1.6Ga grown by molecular-beam epitaxy. At 5 K, the injected electron spin polarizations for Fe and Co2.4Mn1.6Ga injectors are 31% and 13%, respectively. Optical detection is carried out in the oblique Hanle geometry. A dynamic nuclear polarization effect below 10 K enhances the magnetic field seen by the injected spins in both devices. The Co2.4Mn1.6Ga thin films are found to have a transport spin polarization of similar to 50% by point contact Andreev reflection conductivity measurements. (c) 2005 American Institute of Physics.