Display image in console using specified characters
Requirements:
- C++17 compiler
- cmake
- GPU supporting OpenGL >= 3.3
Only tested on Linux & Windows
Commands:
git submodule update --init --recursive
mkdir build && cd build
cmake ..
make -j4
Or (on Windows)
cmake --build . --config Release
Executable will be generated in folder bin
.\show.exe -h
Usage: ConsoleImage [options] filepath
Positional arguments:
filepath image path to display [required]
Optional arguments:
-h --help shows help message and exits
-v --version prints version information and exits
--verbose show processing details [default: false]
--color colored output [default: false]
-s --size number of lines (size) to display (val > 0) [default: 20]
-c --chars characters to use (dark to light) [default: {}]
-e --edge enable edge detection and set edge color(HEX) [default: "000000"]
.\show.exe ..\assets\apple.png -s 30
.\show.exe ..\assets\monalisa.jpg -s 50
.\show.exe ..\assets\lion.jpg -s 40 -c " " -c "." -c "&"
.\show.exe ..\assets\blackhole.jpg -s 30 --color -c " "
.\show.exe ..\assets\starrynight.jpg --color -c " " -s 40 --verbose
Arguments parsed
Image loaded: ..\assets\starrynight.jpg
OpenGL context created
Image processed
Edge detection has been implemented. But it won't improve the visual. The reason is that it is done on the image that is already downscaled, so less info available. Another reason is that edge detection is not guarenteed to generate a smooth and continous outline.