We present the first ab initio calculation of a radiative transition of a hadronic resonance within quantum chromodynamics (QCD). We compute the amplitude for ππ→πγ^{⋆}, as a function of the energy of the ππ pair and the virtuality of the photon, in the kinematic regime where ππ couples strongly to the unstable ρ resonance. This exploratory calculation is performed using a lattice discretization of QCD with quark masses corresponding to m_{π}≈400 MeV. We obtain a description of the energy dependence of the transition amplitude, constrained at 48 kinematic points, that we can analytically continue to the ρ pole and identify from its residue the ρ→πγ^{⋆} form factor.Support is provided by the U.S. Department of Energy contract DEAC05-06OR23177 under which Jefferson Science Associates manages Jefferson Lab, the Early Career award contract DE- SC0006765, and the JSA Graduate Fellowship program. Support is also provided by the U.K. Science and Technology Facilities Council [grant number ST/L000385/1].This is the author accepted manuscript. The final version is available from APS via http://dx.doi.org/10.1103/PhysRevLett.115.24200