Convert a PPM image to a PCX file. More information: https://netpbm.sourceforge.net/doc/ppmtopcx.html.
ppmtopcx path/to/file.ppm > path/to/file.pcx
ppmtopcx -8bit|24bit path/to/file.ppm > path/to/file.pcx