Implement solid_angle function in image utils.