Convert a PBM image to a MacPaint file. See also: macptopbm. More information: https://netpbm.sourceforge.net/doc/pbmtomacp.html.
macptopbm
pbmtomacp path/to/image.pbm > path/to/output.macp
pbmtomacp -norle path/to/image.pbm > path/to/output.macp