ppmtoascii

Convert a PPM image to an ASCII image using ANSI terminal color codes. See also: ppmtoterm, pbmtoascii, pbmto4425. More information: https://netpbm.sourceforge.net/doc/ppmtoascii.html.

ppmtoascii path/to/input.ppm > path/to/output.txt

ppmtoascii -2x4 path/to/input.ppm > path/to/output.txt