Convert images to silly text using braillecode. Supports dithering, dark-on-light and light-on-dark terminals and allows to adjust output brightness.
$ brailleimg <FILE>git clone https://github.com/rr-/brailleimg.git
cd brailleimg
python3 -m pip install --user .
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⠤⠤⠤⠴⠤⠦⠴⠤⠤⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠊⢉⠰⡀⢎⠰⡁⠎⡐⢂⠒⡌⠒⡄⠢⢌⡙⠒⢤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠔⠊⠁⠀⠀⠀⠀⠆⠱⡈⠔⡈⢆⠱⡈⢒⡈⢅⠢⡑⠢⡐⠩⠄⡌⠓⣄⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠈⠀⠀⠀⢀⡀⠤⠤⠒⠊⠓⠉⠚⠑⠊⠲⠥⢦⡘⣄⠢⢡⠑⡨⠑⡌⠰⠡⠌⠳⣄⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢒⣉⡀⠄⠤⠄⠒⠂⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠑⢧⢢⡑⢄⠣⠌⣁⠣⢌⡑⢌⠳⡀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢎⠦⡘⠰⣀⠃⠆⢌⠢⢍⠽⣄⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢣⣅⠣⢄⠩⡘⢄⠊⡜⢲⡘⣆⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⠖⡈⢆⠡⠌⡒⢌⡣⢜⡸⡆⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⡧⢘⠠⢃⠜⡐⢪⡑⢎⡔⣣⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡷⢁⠎⡰⢈⠔⣣⠙⣆⠎⣵⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡠⠤⠔⣂⠒⡒⠒⡒⠒⡒⠢⠤⢄⣀⠀⠀⠀⠀⠀⠀⢸⡑⢊⠔⡠⢃⠞⡤⢋⡴⢩⢼⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⡒⢩⠐⡄⢣⠘⡠⢑⠨⡑⢄⠣⠌⡑⢌⠢⢄⡉⠖⠢⣄⠀⢠⠧⡙⢄⠊⡔⡡⠞⣌⢣⠜⣡⠞⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠤⢒⠡⢂⠱⡈⢆⠡⡘⢄⠱⣀⠃⢆⠡⢊⠄⢣⠘⡄⢊⠔⡨⠌⡡⢄⡙⠣⣗⠈⢆⠱⡰⣉⠞⡤⢓⠎⣥⠇⠀ ⠀⠀⠀⠀⠀⠀⣠⠤⠆⠴⢠⡀⣀⠤⢒⠒⡊⢍⠋⡍⣉⠓⠲⠵⣌⣆⡡⣪⠴⢒⠛⠦⣕⡨⠘⠤⢡⠘⡄⢊⠔⡨⢐⠢⠌⡡⢌⠻⣤⠣⡕⢪⠜⡲⣉⠞⡸⠀⠀ ⠀⠀⠀⠀⢀⠞⡀⢆⡉⢦⠵⡉⠔⡈⢆⠱⢈⠢⡑⠰⢠⠉⢆⠡⢄⢂⡟⢀⠆⣥⣚⣴⣠⠙⢮⡐⢡⠒⡈⢆⡘⠄⣃⠢⡑⠰⣈⠳⣘⢧⡙⣆⠫⠴⡑⢮⠃⠀⠀ ⠀⠀⠀⠀⢸⢠⡑⢦⡝⢃⠰⡈⢆⠱⢈⠢⡁⢆⠡⢃⠆⣉⠢⢑⠨⡘⠆⡱⡞⡁⢆⠠⡙⢌⢺⡅⢢⠘⡐⠢⠌⢒⠠⡑⢨⠑⣌⠳⡌⢎⢷⡌⣣⠝⣌⠏⠀⠀⠀ ⠀⠀⠀⠀⠈⢣⡼⠋⠘⡆⠱⡐⠌⢢⠁⢆⠱⡈⡦⠓⠚⠐⠓⠪⣔⠁⠎⡄⢳⡈⢄⠣⢌⡜⡾⢀⠣⡘⢄⠣⡘⢄⠣⠘⢤⡙⢤⡓⢬⢃⡎⢷⢢⣙⠎⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⢀⠃⠴⠀⡎⢡⠂⡍⢂⠍⡐⢢⡙⠀⠀⠀⣀⠀⠀⠀⢫⠐⡌⢢⠙⡦⠽⡖⣏⠰⡈⠔⡡⢂⠆⡡⢊⠔⡩⢆⡙⢦⡙⢆⡣⢜⡹⡦⠋⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣎⠤⠐⠒⠉⠉⠉⠉⠉⠈⠙⠒⠣⢄⡀⠀⠀⠀⠀⠀⢸⠁⢆⠡⢊⡜⡱⠸⢼⡂⠱⡈⠔⢢⡘⢤⢣⠚⡥⢋⡜⢢⡙⢦⡙⢦⡑⡇⠀⠀⠀⠀⠀⠀ ⠀⠀⢀⠔⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠑⠂⠤⣀⢀⠎⡘⢄⢃⠲⣌⠱⣋⠼⣅⠣⡜⣌⢣⠜⣡⠎⣕⢪⢱⠸⡡⠞⡤⡙⢦⡑⣳⠀⠀⠀⠀⠀⠀ ⠀⡠⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠚⢴⢈⠢⡱⢌⠳⣌⠚⡥⢓⡜⢤⠓⣎⠱⣊⢆⠳⣌⠣⠵⣹⠐⡍⢦⣑⢺⠀⠀⠀⠀⠀⠀ ⠀⡇⠀⠀⠀⠲⠀⠀⠀⠀⠰⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠌⣇⢎⡱⢊⠱⡈⠱⣈⠱⡸⢌⠳⣌⠳⡌⢎⡱⢌⡣⣝⠣⢘⡘⠦⡜⢬⠃⠀⠀⠀⠀⠀ ⠀⠑⣄⠀⢀⣀⣠⠤⢤⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣄⡀⠠⢐⡏⢦⠱⡈⢆⠡⢃⠄⡃⠜⣌⠳⣬⠓⣌⠇⣎⡱⣲⢋⠰⡁⢌⠳⣌⣹⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠉⢃⡸⠈⣧⣼⣿⢉⡛⢒⡓⠶⠴⢢⡔⢦⠞⡚⣭⠞⠀⠈⢀⡾⡘⢦⡑⠌⡄⠣⠌⣂⠱⡈⢔⢣⢺⡍⢦⡙⣤⢟⡡⢎⡔⡈⠆⢳⡐⡮⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⢰⡛⣿⣿⡠⠜⢢⠘⡄⢣⢑⡘⢣⢎⡵⠃⠀⢀⡴⢫⡔⡍⢦⡙⡔⢨⢁⠒⠤⢡⠘⠌⢦⢣⣏⠖⠋⠀⠈⠳⣌⠲⣡⠞⠂⠛⡅⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⡏⢣⡀⠙⠛⠼⠦⡱⠜⠦⠧⠞⠋⠁⠀⣀⡴⢫⠜⣡⠚⡜⢢⠻⣌⢣⢌⡘⠄⡃⠜⡈⠶⣡⠆⠀⠀⠀⠀⠀⠈⠳⠇⠤⠐⠊⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠖⠉⠉⢙⠦⢄⡀⠀⠀⠀⠀⠀⢀⣀⡴⠚⠉⠉⠁⠋⠁⠋⠉⠉⠉⠉⠓⢮⣐⢣⠘⣤⣁⠳⣌⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠈⠉⠈⠉⠀⠀⠀⠈⠉⠁⠉⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠦⣛⠀⠀⠉⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠒⠂⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀🮂⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀▗⠀⠀▖⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀▗⠀⠀▂▂▙▘⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀▘⠀▝🮅⠀⠀█⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀▖⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀▄⠀⠀▐⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀▀▌⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀▖⠀▌⠀▚⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀▙▝⠀⠀⠀⠀▌▌⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀▝🮂▌▚⠀▌⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀▐▗⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀▐⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀▐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
0.2:
- Added Otsu and Median threshold algorithms
- Added full blocks output method
- Fixed ghost borders when aspect ratio calculations resulted in extra rows or columns
- Fixed aspect ratio calculation
- Switched to UV for package managing
- Switched to Pillow for image processing (reduced binary size)
- Switched to argparse for CLI handling
0.1:
- Initial version