pbmtopgm
Convert a PBM image to PGM by averaging areas surrounding individual pixels. tldr-pages
On several platforms
Several platforms
Convert PBM image to PGM by averaging the wxh-sized area surrounding each pixel
pbmtopgm w h path/to/image.pbm >path/to/output.pgmIdentify