added pnm/ppm/pgm parser