pamtopnm
Convert a PAM image to an equivalent PNM image.
TLDR
Convert a PAM image to an equivalent PNM image, i.e. a PBM, PGM or PPM image
$ pamtopnm [path/to/image.pam] > [path/to/output.pbm|pgm|ppm]
Display version
$ pamtopnm -version
Convert a PAM image to an equivalent PNM image, i.e. a PBM, PGM or PPM image