  Time delays between multiple images of lensed sources can probe the geometry
of the universe. We propose a novel method based on free-form modelling of
gravitational lenses to estimate time-delay distances and, in turn,
cosmological parameters. This approach does not suffer from the degeneracy
between the steepness of the profile and the cosmological parameters. We apply
the method to 18 systems having time delay measurements and find
H_0=69+-6(stat.)+-4(syst.) km s^{-1}Mpc^{-1}. In combination with WMAP9, the
constraints on dark energy are Omega_w=0.68+-0.05 and w=-0.86+-0.17 in a flat
model with constant equation-of-state.
