Lineshapes in phase-encoded spectroscopic imaging experiments