add support for binary pbm/pgm/ppm