Encoders and decoders for PPM image formats P1 to P6.