Linux command
pixterm 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Display image in terminal
pixterm [image.png]
Scale to terminal width
pixterm -s [2] [image.png]
Set character cell size
pixterm -tc [2] -tr [6] [image.png]
Use specific color depth
pixterm -d [24] [image.png]
Dithering mode
pixterm -m [0] [image.png]
Output to file
pixterm [image.png] > [output.txt]
说明
pixterm renders images directly in the terminal using ANSI escape codes and Unicode half-block characters. Each text character cell represents two vertical pixels, achieving higher resolution than character-only renderers. Color depth can be set to 24-bit true color for maximum quality or 8-bit (256 colors) for broader terminal compatibility. Dithering algorithms improve gradient and color transition rendering at the cost of processing time. Output is standard ANSI text that can be redirected to a file for later display. The scale and cell size parameters control how the image maps to terminal dimensions.
参数
- -s _SCALE_
- Scale factor for the image.
- -tc _N_
- Terminal columns to use for rendering width.
- -tr _N_
- Terminal rows to use for rendering height.
- -d _DEPTH_
- Color depth: 8 (256 colors) or 24 (true color).
- -m _MODE_
- Dithering mode. Renders using block elements with different shades or ASCII characters.
- -noresize
- Don't resize image to fit terminal.
- -matte _COLOR_
- Background matte color for transparent images.
FAQ
What is the pixterm command used for?
pixterm renders images directly in the terminal using ANSI escape codes and Unicode half-block characters. Each text character cell represents two vertical pixels, achieving higher resolution than character-only renderers. Color depth can be set to 24-bit true color for maximum quality or 8-bit (256 colors) for broader terminal compatibility. Dithering algorithms improve gradient and color transition rendering at the cost of processing time. Output is standard ANSI text that can be redirected to a file for later display. The scale and cell size parameters control how the image maps to terminal dimensions.
How do I run a basic pixterm example?
Run `pixterm [image.png]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -s _SCALE_ do in pixterm?
Scale factor for the image.