converts an image to ascii art
you can download the latest release from github: here
zig build -Drelease
the above command builds an executable found at ./zig-out/bin
if you want to just directly run the executable, run:
zig build run -Drelease -- [options]
see below for explanations for available options
run the program with the following options (the default zig install directory is ./zig-out/bin
):
/path/to/asciigen [options]
-
options:
-h, --help
: print the help message and exit-i, --input <file>
: specify the input image file (required)-o, --output <file>
: specify the output image file (optional, default:<input>_ascii.jpg
)-c, --color
: use color ascii characters (optional)-s, --scale <number>
: set the downscale factor (optional, default: 1)-e, --detect_edges
: enable edge detection (optional)--sigma1 <number>
: set the sigma1 value for DoG filter (optional, default: 0.3)--sigma2 <number>
: set the sigma2 value for DoG filter (optional, default: 1.0)
-
examples:
basic usage:
asciigen -i input.jpg -o output.png
using color:
asciigen -i input.png -o output.png -c
with edge detection, color, and custom downscale:
asciigen -i input.jpeg -o output.png -s 4 -e -c
-
the program will generate an ascii art version of your input image and save it as a new image file.
output file needs to be a .png
since i saw some weird issues with jpegs.
the zig version is the only one i'll be working on from here on. the c code was just to get me started until i figured out some issues with the build.zig