Skip to main content

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.

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

ita-converter-0.9.3.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ita_converter-0.9.3-py2.py3-none-any.whl (2.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ita-converter-0.9.3.tar.gz.

File metadata

  • Download URL: ita-converter-0.9.3.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for ita-converter-0.9.3.tar.gz
Algorithm Hash digest
SHA256 afe1e6c09f391d28c0888c2508b782f2ae2883bcc02fd2cf0486a85ab04903ff
MD5 a9a23047fa04726eb1cb65093d7b369d
BLAKE2b-256 48b6c96329b0ea1af4f78d118d731509e0d271f864d80162c8650b28304818cd

See more details on using hashes here.

File details

Details for the file ita_converter-0.9.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ita_converter-0.9.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3aa2fcb834b335a3f350a1bb8bef0d85b5a95e50fdcf9c8b10b54da24f1b7f8f
MD5 f1a4525e5e82fcb140c94c819010d7c3
BLAKE2b-256 8baf88e917e7e7d46ed2a7ad3e662942cae025d6c9ef03b166094674ae3c1b79

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page