← 返回命令列表

Linux command

img2sixel 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Display image in terminal

img2sixel [image.png]

Set width

img2sixel -w [800] [image.png]

Set height

img2sixel -h [600] [image.png]

Specify colors

img2sixel -p [256] [image.png]

Pipe output

curl [url/image.png] | img2sixel

说明

img2sixel converts images to Sixel format for terminal display. Sixel enables inline graphics in compatible terminals. The tool supports various image formats and outputs Sixel escape sequences. It works with terminals like xterm, mlterm, and others.

参数

-w _WIDTH_
Output width in pixels.
-h _HEIGHT_
Output height in pixels.
-p _COLORS_
Number of colors.
-d _DIFFUSION_
Dithering method.
-e
Encode only (no display).
--help
Display help information.

FAQ

What is the img2sixel command used for?

img2sixel converts images to Sixel format for terminal display. Sixel enables inline graphics in compatible terminals. The tool supports various image formats and outputs Sixel escape sequences. It works with terminals like xterm, mlterm, and others.

How do I run a basic img2sixel example?

Run `img2sixel [image.png]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -w _WIDTH_ do in img2sixel?

Output width in pixels.