Files
tldr/pages.zh/common/ppmtoascii.md

516 B
Raw Blame History

ppmtoascii

使用 ANSI 终端颜色代码将 PPM 图像转换为 ASCII 图像。 另见: ppmtotermpbmtoasciipbmto4425。 更多信息: https://netpbm.sourceforge.net/doc/ppmtoascii.html

  • 将 PPM 图像转换为 ASCII 图像,将 1x2 像素区域组合成一个字符:

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

  • 将 PPM 图像转换为 ASCII 图像,将 2x4 像素区域组合成一个字符:

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