TT-392 / toBraille

toBraille is an image to unicode braille art.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image to braille converter

toBraille is an application to convert an image to braille unicode art.

example:

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣼⣧⣠⣤⣦⣶⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣴⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⡿⠏⢹⢸⣿⣿⣿⡿⣿⣿⠿⠛⡽⢹⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⣭⣤⣤⣾⣿⣿⣿⣷⣶⣿⣿⣿⣿⡁⠨⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⢸⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⠛⠋⠁⠀⠀⢽⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⢀⣹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⠀⢀⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⡿⢀⣀⣤⣶⣾⠿⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣂⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⠟⠃⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⠁⢸⣿⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀ ⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⢸⣿⠃⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⠀⠀⠀ ⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⡄⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⣹⣿⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀ ⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢘⣿⣇⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠙⢷⣿⡗⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀ ⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⢿⣿⡄⠀⠠⣿⣿⣿⣿⣿⣿⠁⠉⠹⣿⣿⣿⣿⣿⣿⣧⣄⣸⣿⣧⠀⠰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡗⠀ ⠀⣾⣿⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠈⢿⣷⡀⢸⣿⣿⣿⣿⣿⡟⠀⠀⠀⢻⣿⣿⣿⣿⣿⣇⢩⣿⠛⠋⠀⠠⣿⣿⣿⣿⣿⣿⣿⣿⣿⠹⣿⣿⡇⠀ ⢰⣿⣿⠂⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠈⢻⣷⣼⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⢐⣿⣿⣿⣿⣿⣿⣿⣿⣿⠄⠈⢿⣿⡀ ⢼⣿⡿⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠙⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠈⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠈⣿⡧ ⣿⣿⡗⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀⢀⣿⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣇⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⡷⠀⠀⢸⣿ ⣿⣿⡇⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⢀⣾⣿⣿⣿⡏⠈⠁⠀⠀⠀⠀⠀⠀⢀⡼⣿⣿⣿⣿⣆⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⠀⠀⢘⣿ ⣿⣿⣇⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⢀⠴⠋⠀⠘⣿⣿⣿⣿⣦⡀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢨⣿ ⢿⣿⣧⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⠀⣾⠃ ⠸⣿⣿⡀⠀⠀⠈⢻⣿⣿⣧⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⢀⡼⠋⠀ ⠀⠹⣿⡇⠀⠀⠀⠀⠙⢿⣿⣷⡄⠙⢻⣿⣿⣿⣿⣿⣿⣿⣝⢿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢋⣿⡿⠁⠀⠈⠀⠀⠀ ⠀⠀⠉⢿⣦⣀⠀⠀⠀⠀⠙⠻⣿⣦⣼⣿⣿⡟⠿⣿⣿⣿⣿⡄⠘⢆⠀⠀⠀⠀⠀⠀⠀⢀⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⢀⣼⡿⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠈⢻⡌⠉⠀⠀⠀⠀⠀⠀⠉⣿⣿⡿⠤⠄⠘⣿⣿⣿⣯⠀⠀⠀⠀⠀⠀⠀⣠⣾⡿⠿⠛⠛⣋⣿⡿⣿⣿⡏⠁⠀⢠⡾⠋⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠙⠧⣀⠀⠀⠀⠀⠀⢸⣿⡿⠀⠀⠀⠀⢪⠹⣿⣿⠀⠀⠀⠀⠀⢀⡞⠋⠀⠀⠀⢀⡖⠋⠀⠀⠸⣿⣷⡤⠖⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠈⠑⠀⠀⠀⢰⣿⣿⠇⠀⠀⠀⠀⠙⠀⢹⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣽⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⣾⣿⣿⡅⠀⠀⠀⠀⠀⠀⢸⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠼⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

how to build:

Just clone the project and type make.

how to install:

Copy the toBraille executable that was created by the makefile to /bin. make
sudo cp toBraille /bin

how to use:

First you have to get an image and make sure it is the size you want (one dot = one pixel). This can be done from the commandline if imagemagick is installed:
convert [yourimage.png] -resize [wantedpercentage>% [smaller version of your image.png]

When you are done with this you need to know its size this can be done on most linux distros using the file command.
file [smaller version of your image.png]

When you know the size of the image convert the image to a .mono file this can also be done using imagemagick
convert [smaller version of your image.png] [mono version of your image.mono]

TL;DR:
make sure your image is the right size and know the resolution in pixels
convert this image to a .mono

When you have prepared the image you can use toBraille by typing;
toBraille [filename] [width] [height]

About

toBraille is an image to unicode braille art.

License:Do What The F*ck You Want To Public License


Languages

Language:C++ 97.2%Language:Makefile 2.8%