Skip to main content

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.

Metadata

Release files for ita-converter 0.9.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ita-converter 0.9.3
File Size Uploaded Provenance Actions
ita-converter-0.9.3.tar.gz 2.4 kB Without provenance Details for ita-converter-0.9.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ita-converter 0.9.3
File Interpreter ABI Platform Actions
ita_converter-0.9.3-py2.py3-none-any.whl Python 2, Python 3 none any Details for ita_converter-0.9.3-py2.py3-none-any.whl

Total release size: 5.0 kB

Release files / ita-converter-0.9.3.tar.gz

Download URL ita-converter-0.9.3.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
afe1e6c09f391d28c0888c2508b782f2ae2883bcc02fd2cf0486a85ab04903ff
BLAKE2b-256 checksum
How to use checksums
48b6c96329b0ea1af4f78d118d731509e0d271f864d80162c8650b28304818cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.0

Release files / ita_converter-0.9.3-py2.py3-none-any.whl

Download URL ita_converter-0.9.3-py2.py3-none-any.whl
Size 2.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
3aa2fcb834b335a3f350a1bb8bef0d85b5a95e50fdcf9c8b10b54da24f1b7f8f
BLAKE2b-256 checksum
How to use checksums
8baf88e917e7e7d46ed2a7ad3e662942cae025d6c9ef03b166094674ae3c1b79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.0

Security for ita-converter 0.9.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page