Modifies Encode() to accept a PPMType constant, which
determines the output type of the function.
This decouples the PPM output format from the input image
type and allows any image.Image implementation to be saved
as any of the known PPM formats.