lepton9/asconv
Image to ascii converter
993234e908b189f47f7a8a432133742409d4a3ff
master
CLI tool to convert images to ascii
Compiled binary in zig-out/bin/asconv
zig build -Doptimize=ReleaseFast
Omit the
-Doptimize=ReleaseFast
flag for a debug build.
asconv [command] [options]
ascii Convert to ascii
size Show size of the image
help Print help
-i, --input <path> Input file or url
-o, --out <filename> Path of the output file (omit to output to stdout)
-w, --width <int> Width of wanted image
-h, --height <int> Height of wanted image
-s, --scale <float> Scale the image to size
-f, --fit Scale the image to fit the terminal
-b, --brightness <float> Set brightness boost
-r, --reverse Reverse the charset
--charset <string> Set custom characters to use
-c, --color <?color256|truecolor> Output with ANSI colors and set color range (default: color256)
-e, --edges <?sobel|LoG|DoG> Turn on edge detection and set algorithm (default: sobel)
--sigma <float> Sigma value for DoG and LoG (default: 1.0)
-t, --time Show the time taken to convert the image
--config <string> Set custom config path to use
--ccharset <key> Use custom characters that are saved in the config
Option arguments prefixed with
?
are optional.
The config is stored in a TOML
file. The file config.toml
can be placed in standard config directories based on the operating system. For instance, on Linux, it can be located at ~/.config/asconv/config.toml
.
# config.toml
[charsets]
utf = "░▒▓"