Skip to content

Michicosun/img2ascii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image to ASCII

This small program convert some image formats to ASCII representation and print it to the terminal in raw format

Build

git clone --recursive https://github.com/Michicosun/img2ascii

Firstly, you should build OpenCV lib:

$ cd contrib/
$ rm -rf build
$ mkdir build && cd build
$ cmake .. -G Ninja
$ ninja opencv_imgcodecs

If you want a static build of the program, add -DBUILD_SHARED_LIBS=OFF parameter for cmake

$ cmake .. -G Ninja -DBUILD_SHARED_LIBS=OFF

On the second stage, build the program:

$ cd path_to_img2ascii
$ rm -rf build
$ mkdir build && cd build
$ cmake .. -G Ninja
$ ninja img2ascii

Interface:

$ ./img2ascii <path_to_image> [OPTIONS]

Initially it runs with scale factor=1, but you can change it, by adding -r parameter in command

$ ./img2ascii <path_to_image> -r 0.3

Also, you can turn on colored output by adding -c key

$ ./img2ascii <path_to_image> -r 0.3 -c

About

Converts image to ascii

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published