add support for binary pbm/pgm/ppm

Signed-off-by: niql <niqingliangl2003@gmail.com>