The geometry of gravitational lensing magnification