The lattice strain caused by electron emission from DX centers was determined by x-ray diffraction for Sn-doped and Si-doped Ga1-xAlxAs, with x(Al) = 0.22-0.24. Measurements were made after cooling samples to 14 K in the dark, which filled DX centers and thereby produced low conductivity. The measurements were repeated after emptying the DX centers by ir illumination, giving DELTAN(e) = (1.0-1.6) X 10(18) cm-3 conduction electrons which persisted after illumination. The Ga1-xAlxAs:Sn lattice parameter increased on illumination, DELTAa/(aDELTAN(e)) = +(7.9+/-2) X 10(-24) cm3. The Ga1-xAlxAs:Si lattice parameter also increased on illumination, DELTAa/(aDELTAN(e)) = +(6.0+/-2) X 10(-24) cm3. Most of this expansion can be attributed to filling conduction-band states and is simply related to the conduction-band deformation potential and bulk modulus. However, for the Sn-doped materials, and probably also for the Si-doped materials, there is additional lattice expansion caused by emptying DX centers. Our results suggest that this expansion is larger for the Sn-doped samples than for the Si-doped samples: beta(DX)(Sn) = +(3.1+/-2) X 10(-24) cm3 and beta(DX)(Si) = +(1.2+/-2) X 10(-24) cm3. This is the part of the lattice expansion attributable to local bonding changes which occur when the DX centers are emptied. From these results, values are derived for the pressure dependence of the Sn- and Si-related DX levels, with no assumptions about the charge state or degeneracy of the DX levels: d (E(DX) - E(GAMMA)(c))/dP = -(147+/-40) meV/GPa for Sn, and -(111+/-40) meV/GPa for Si.