An image-to-ascii-art converter
Project description
<(||')
asciibee <(||')
An image-to-ascii-art converter
Description
The default settings are tuned to work best with fine art. Play with different shaders, chunk sizes, and value inversion for different results. Remember to decrease your font size if you can't see the whole image.
Scaling is accomplished by dividing the image into chunks and converting each chunk to a single character. The chunk size can be adjusted with the -c flag. The chunk size defaults to the pixel width of the image divided by 100. The output will tell you what chunk size was used.
Installation
$ pip install asciibee
Usage
The best way to learn how to use the app is via the help text:
$ asciibee --help
The most simple command is passing in a path to an image file:
$ asciibee ~/Downloads/starrynight.png
You can use it as an importable module as well.
from asciibee.image import AsciiImage
image = AsciiImage('/Users/jnakama/Downloads/port.jpeg')
image.convert() # Converts the image to a matrix of ASCII characters
image.ascii_matrix # It's stored here
image.show() # Prints the characters
Development
The build system and package manager is poetry.
The easiest way to run the app locally:
$ poetry run python -m asciibee.main <path_to_image>
You can also install the deps and run it without the poetry run
prefix.
... ..... ......
..,,-,. ..,. ..,,....
..,-.. .,,. .,..
.-.. .,-,,..-.. ......
..,,. .####+###+.. ..,,,,,,..
..+-.. -+@@@##@@#+ .....,,,,,.
..,---.-++++++#+#-.,--,,,....
..-#++#######++#+,.
. .. ,#++@@@@#@@@#+.. ...
..,,-,-,-,,,..,-++##@@##@###+++-,,,..,,,,,,,..
......,,,-++++#+###########+++----,,,... .
.....,,,,,,----------+++-###+#++#+++++----------,,,,,,......
...,,,-,,,,,,,,,-,,,,--------+-..#####-..,+-+----,,,-----,-,,,---,,,,....
...,,,,,,,,,,-,,,,,,,,,-,--,,--,.-+########+-,--+-----,,,,,,,---,,--,---,,,,,..
..,,,,,,.,,.,,,,,,,.,,--,,,,-,--..-+####@@@@@##-.,-+-,,,--,,,,,,,,--,,,,,,--,,,,.
.,,,,,,.,.,,.,,,..,,-,,,,,,,--+..,++++++++#####+-.,----,,-,,-,,,,,,,,,-,,.,,,-,,.
.,,,,,,.,,,.,,,,,,,,,,,,,,-,-+. .+###++#####@###+...---,,,,-,,------,,,,,,,,,..
...,,,,,,,.,,,,,,,,,,,,,,-,. ,#@@@#-+###@@@@@#, ,-,,,,,,,,,,,,,,,.,,....
..........,-,... ,+##++++###@@@##+-. .,,,..... .
..,-,... ,+##++#++++######-. ..,..
.,,,... ,#@@##+##@@#@@@@#-. .,,.
.,,. .+####++#@@@@@@#+.. .,.
... ..+++++++######+,. ...
.+###++####@#-.
,+##+######-.
...-##@#+-...
..--...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file asciibee-0.3.2.tar.gz
.
File metadata
- Download URL: asciibee-0.3.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.2 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9381499713e5ee1c6cdc5c5b51fa442c0c9828455dcee4aca2fb1a70335ee9a |
|
MD5 | f32e6f05e17679c6d437bafa06860aec |
|
BLAKE2b-256 | aab5d0871ab93555856c999d26d8a51187394cc0c50cdbe037411cc69827b43a |
File details
Details for the file asciibee-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: asciibee-0.3.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.2 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 721a8e97d82bcbcadb28afb239874d97f3622f350f520d874e4ae6389cc35b82 |
|
MD5 | 0b0691ab4d757e97e79977e43d85b071 |
|
BLAKE2b-256 | b618f3cf3f9e74cc6073ab611f317e6be053b5a17e3f18176feea49778aa0476 |