ita-converter - convert your images to ASCII art easily!
Project description
ita-converter
ita-converter is a lightweight and fast Python library that converts an image to ASCII art. It allows users to resize images, convert them to grayscale, and customize the symbols used to create the ASCII art. View on PyPi!
Installation
You can install ita-converter using pip:
pip install ita-converter
Usage
To use ita-converter, simply import the get_ascii_art()
function and pass in the path to the image file you want to convert. By default, the function will use a set of ASCII characters to create the art, but you can also pass in your own symbol set.
from ita_converter import get_ascii_art
ascii_art = get_ascii_art("path/to/image.png", symbol_set=["@", "#", "*", " "])
print(ascii_art)
By default, the function will use color in the output. If you want a black and white output, set color
to False
.
ascii_art = get_ascii_art("path/to/image.png", color=False)
print(ascii_art)
You can also resize the image and specify the width and height of the output. If you only specify the width, the height will be adjusted automatically to maintain the aspect ratio.
ascii_art = get_ascii_art("path/to/image.png", width=50, height=50)
print(ascii_art)
You can specify the colour_type
. By default it is ANSI, but you can also set it to HTML.
ascii_art = get_ascii_art("path/to/image.png", colour_type="html")
print(ascii_art)
or
ascii_art = get_ascii_art("path/to/image.png", colour_type="ansi")
Contributing
Contributions are welcome! If you have an idea for a new feature or want to report a bug, please open an issue. If you want to contribute code, please fork the repository, make your changes, and submit a pull request.
License
ita-converter is licensed under the MIT License.
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
Hashes for ita_converter-0.9.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58d535a3c347efdc08f2ea1f3bcd99b489f8138d4edf53711615b14c1ce9bc00 |
|
MD5 | 0d2f1c7c114039eb41abedfe6e4717ca |
|
BLAKE2b-256 | f3e6e090bb622bd836af17358515b2b2d0687d4460758323c76cf36319609d4d |