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

13 lines
516 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ppmtoascii
> 使用 ANSI 终端颜色代码将 PPM 图像转换为 ASCII 图像。
> 另见: `ppmtoterm``pbmtoascii``pbmto4425`。
> 更多信息: <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}}`