Artem
This is a small cli program written in rust to easily convert images
to ascii art, named after the latin word for art. It will take a while to generate the ascii characters, especially for larger images. By default it tries to use truecolor, if the terminal does not support truecolor, it falls back to 16 Color ANSI. When the ascii image is written to a file, the image will not use colors.
It supports .jpeg, .png, .gif, .webp and many more.
Examples
Input
Output

Usage
For simply converting an image:
For more options use:
To use custom ascii chars, use the --characters (or -c for short) argument.The characters should be ordered from darkest/densest to lightest.
If the background should be invisible, add a space at the end. Alternatively this program has already 3 predefined character sets,
accessibly by supplying the --characters argument to gether with the number (0, 1 or 2) of the preset that should be used.
By default preset 1 is used.
To change the size at which the converted image is displayed, use:
#for auto sizing height
#for auto-sizing width
#for manual resizing use the --size flag
To save the the image to a file, use the --output flag.
#if the output file is an html file, the resulting ascii art will be saved as html ascii art
# or alternatively, use an .asn file for colored ascii art
Installation
The easiest way to install artem is using cargo with
Alternatively, if you are on Debian/Ubuntu download the .deb file from the releases tab and install it with:
One other distributions use the binary file provided in the release tab.
Building from source
If you have rust/cargo installed, you can build the project with:
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please be aware that it might take some time for someone to respond.
Credits/Inspiration
This projects was heavily inspired by jp2a as well as the coding train video on ascii art.
Also a big thanks to ripgrep for indirectly helping with inspiration for the build setup.
Todo
-
Better average the RGB values of multiple pixel
-
Use the current terminal size to auto fit the image
-
Support ANSI terminal colors
-
Convert output to colored html
-
Use multithreading
-
Add tests
-
Add even more test
-
Convert multiple files at once
-
Automate copying of completion files from OUT_DIR to deployment/assets
-
Change name
-
Publish
Ideas
-
Use edge detection and directional ascii
-
Implement better resizing
