Measuring Galaxy Shapes for Cosmology