Converts an image to ASCII art using numpy / numexpr / cv2
Tested against Windows 10 / Python 3.11 / Anaconda
pip install numpyasciiart
Convert an image to ASCII art.
Parameters:
img (str or numpy.ndarray): url/path/base64/bin/np.array/PIL.Image representing an image.
width (int): Width of the ASCII art output.
height_adjust_stretch (float): Vertical stretch factor for the ASCII art.
letters (str): The set of characters to use for varying shades in the ASCII art.
Returns:
str: ASCII art representation of the input image.
Example:
To convert an image and print it as ASCII art:
from numpyasciiart import to_ascii
pic = to_ascii(
img=r"https://www.python.org/static/img/python-logo.png",
width=160,
height_adjust_stretch=2.5,
letters="█▓▓▒▒░░ ",
)
print(pic)
Metadata
Release files for numpyasciiart 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| numpyasciiart-0.10.tar.gz | 55.3 kB | Without provenance | Details for numpyasciiart-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| numpyasciiart-0.10-py3-none-any.whl | Python 3 | none | any | Details for numpyasciiart-0.10-py3-none-any.whl |
Total release size: 111.6 kB
Release files / numpyasciiart-0.10.tar.gz
| Download URL | numpyasciiart-0.10.tar.gz |
|---|---|
| Size | 55.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30fd410c2196dbf842e960aaf3fd00c6312a22853fa208590483eb0c2be8931b
|
|
BLAKE2b-256 checksum How to use checksums |
6d35ca69aa0c8f6f3a3304b4df2013915eba0e1b3b17401289f3d8df990463d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / numpyasciiart-0.10-py3-none-any.whl
| Download URL | numpyasciiart-0.10-py3-none-any.whl |
|---|---|
| Size | 56.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a938f440ef0182447a6d5a00eace9217f96a4e132db8b645a0dc2e849f720b1b
|
|
BLAKE2b-256 checksum How to use checksums |
a928240fae7440128731d251f2c06fe5bb89ee35761fefa2cdf1b64ee332191a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for numpyasciiart 0.10
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.