Beyond just the input and output files, you can specify:
- Downsampling: Pixels per character
- Supersampling: Amount of pixels to sample for each character, high value -> smoother/blurrier image
- Invert: Specify
0
for bright backgrounds and1
for dark backgrounds
If you're on Windows, there is a precompiled binary in Releases, otherwise you have to compile it yourself.
Launch the executable and specify the asked-for parameters (in order). Generally I'd recommend you play around with the Downsampling and Supersampling variables to get the desired look.
Not all fonts are created equal. The "pixel characters" that I decided on using were "tuned" using Consolas, as such there might be other fonts in which the order of the characters should be different. These characeters seemed to work well enough for most monospaced fonts that I've tried however.
Also keep in mind that Notepad++ sometimes stretches the characters at some zoom levels, therefore if you're having issues with the output looking a bit wonky, try a different level.
It absolutely will not work as intended with a non-monospaced font however (Though admittedly it can lead to some interesting results. Attempt it at your own peril.)
Use the provided CMakeLists.txt file to generate a project:
mkdir build
cd build
cmake ../
Running asciify with the following file structure and settings:
asciify
├── asciify.exe
└── sadge.png
[input file] [output file] [downsampling] [supersampling] [invert]
> sadge.png out.txt 10 5 1
... results in the following file structure (note the addition of out.txt
):
asciify
├── asciify.exe
├── out.txt
└── sadge.png
where out.txt
contains:
These images were generated using invert=1
and with various Downsampling and Supersampling values. They were screenshot in Notepad++ with the Obsidian theme and with the font Consolas.
lodepng by lvandeve is used to load bitmaps from .png files.
The photograph used in the background of the title image (img/title.png) is by Aióny Haust and features Aidana Sahari.