Convert a raw greyscale image to a PGM image. More information: https://netpbm.sourceforge.net/doc/rawtopgm.html.
rawtopgm width height path/to/image.raw > path/to/output.pgm
rawtopgm path/to/image.raw > path/to/output.pgm
rawtopgm width height -bottomfirst path/to/image.raw > path/to/output.pgm
rawtopgm width height -headerskip n path/to/image.raw > path/to/output.pgm
rawtopgm width height -rowskip m path/to/image.raw > path/to/output.pgm
rawtopgm width height -maxval N path/to/image.raw > path/to/output.pgm
rawtopgm width height -bpp 1|2 -littleendian path/to/image.raw > path/to/output.pgm