Linux command
ascii-image-converter 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Convert image to ASCII art
ascii-image-converter [image.png]
Convert with color output
ascii-image-converter -C [image.png]
Convert with specific width
ascii-image-converter -W [80] [image.png]
Convert using braille characters
ascii-image-converter -b [image.png]
Use a custom character map
ascii-image-converter -m " .:-=+*#%@" [image.png]
Fit output to terminal width
ascii-image-converter -f [image.png]
Save output as PNG image
ascii-image-converter -s [output_dir] -C [image.png]
说明
ascii-image-converter transforms images into ASCII art. It analyzes pixel brightness and maps values to ASCII characters, creating text representations of images viewable in terminals. The tool supports various image formats and can produce colored output using ANSI escape codes.
参数
- -C, --color
- Display with colors from the original image
- -b, --braille
- Use Braille characters instead of ASCII
- -g, --grayscale
- Display in grayscale colors
- -n, --negative
- Invert colors
- -c, --complex
- Use a wider range of ASCII characters for more detail
- -m _chars_, --map _chars_
- Custom character string (darkest to lightest)
- -d _width_,_height_, --dimensions _width_,_height_
- Set width and height in character lengths
- -W _width_, --width _width_
- Set width; height calculated by aspect ratio
- -H _height_, --height _height_
- Set height; width calculated by aspect ratio
- -f, --full
- Fit to terminal width while maintaining aspect ratio
- -x, --flipX
- Flip horizontally
- -y, --flipY
- Flip vertically
- --dither
- Apply dithering for braille art
- --threshold _value_
- Threshold (0-255) for braille pixel comparison
- --color-bg
- Apply color to character backgrounds instead of foregrounds
- -s _dir_, --save-img _dir_
- Save output as PNG image
- --save-txt _dir_
- Save output as TXT file
- --save-gif _dir_
- Save converted GIF as ASCII art GIF
- --only-save
- Suppress terminal output when saving
- --formats
- Display supported input image formats
FAQ
What is the ascii-image-converter command used for?
ascii-image-converter transforms images into ASCII art. It analyzes pixel brightness and maps values to ASCII characters, creating text representations of images viewable in terminals. The tool supports various image formats and can produce colored output using ANSI escape codes.
How do I run a basic ascii-image-converter example?
Run `ascii-image-converter [image.png]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -C, --color do in ascii-image-converter?
Display with colors from the original image