Convert images and video to ASCII art
Project description
asciiify
Python library and CLI for converting images to ASCII art. Powered by Rust via PyO3.
Part of the asciiify project.
Install
pip install asciiify
CLI
Installing the package also provides the asciiify command:
# Convert an image
asciiify image.png
# Braille mode, custom width
asciiify photo.jpg -m braille -w 100
# Output to file
asciiify image.png -o output.txt
# All options
asciiify --help
Or via python -m:
python -m asciiify image.png -m half-block -w 80
Library Usage
import asciiify
# Convert image file
print(asciiify.convert("image.png"))
# With options
art = asciiify.convert("photo.jpg", mode="braille", width=100, height=50)
# Convert from bytes
with open("image.png", "rb") as f:
art = asciiify.convert_bytes(f.read(), mode="half-block", width=80)
# Reusable converter with preset options
converter = asciiify.Converter(mode="ascii", width=120, invert=True)
art = converter.convert("image.png")
art = converter.convert_bytes(data)
Output Modes
| Mode | Description |
|---|---|
"ascii" |
Classic character ramp (default) |
"half-block" |
Unicode blocks, 2x vertical resolution |
"braille" |
Unicode braille, 4x vertical resolution |
API
convert(path, *, mode="ascii", width=None, height=None, invert=False, charset=None) -> str
Convert an image file to ASCII art.
convert_bytes(data, *, mode="ascii", width=None, height=None, invert=False, charset=None) -> str
Convert in-memory image bytes to ASCII art.
Converter(*, mode="ascii", width=None, height=None, invert=False, charset=None)
Reusable converter with preset options. Has .convert(path) and .convert_bytes(data) methods.
License
MIT
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 Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asciiify-0.2.0.tar.gz.
File metadata
- Download URL: asciiify-0.2.0.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c185f179de0e69707de14835f1960e5e1f28cc2f7076698cda4559f52604daa
|
|
| MD5 |
ccd6c6c9149bb1b2826de279ab80b8de
|
|
| BLAKE2b-256 |
44410945217bc71ba22ccfd8cf721fa1db5aab048c8daa25e43043653b7b3a55
|
Provenance
The following attestation bundles were made for asciiify-0.2.0.tar.gz:
Publisher:
release.yml on tomerramk/asciiify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asciiify-0.2.0.tar.gz -
Subject digest:
3c185f179de0e69707de14835f1960e5e1f28cc2f7076698cda4559f52604daa - Sigstore transparency entry: 1288777489
- Sigstore integration time:
-
Permalink:
tomerramk/asciiify@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tomerramk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Trigger Event:
push
-
Statement type:
File details
Details for the file asciiify-0.2.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: asciiify-0.2.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 807.1 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07b313f925e86023971daf9feed7c95d7373d9a491cf75a57098145550785336
|
|
| MD5 |
b28169bda253a21cd6de5217824f1969
|
|
| BLAKE2b-256 |
f8a03b6230136324f40a71e1227ae12764b05f08d6b47b86d8c88ab93aff2161
|
Provenance
The following attestation bundles were made for asciiify-0.2.0-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on tomerramk/asciiify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asciiify-0.2.0-cp39-abi3-win_amd64.whl -
Subject digest:
07b313f925e86023971daf9feed7c95d7373d9a491cf75a57098145550785336 - Sigstore transparency entry: 1288777550
- Sigstore integration time:
-
Permalink:
tomerramk/asciiify@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tomerramk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Trigger Event:
push
-
Statement type:
File details
Details for the file asciiify-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: asciiify-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e7ad77e2b6cab783fe35588cde49e49a6afbcf207a63d088e91543d75c8a967
|
|
| MD5 |
0f37d66ecc64717e54d45c234bdf7f04
|
|
| BLAKE2b-256 |
b16fb15eb489909c99c9af355b8abb57a9058b643316b4e11620812ebf3d6fe2
|
Provenance
The following attestation bundles were made for asciiify-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on tomerramk/asciiify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asciiify-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
1e7ad77e2b6cab783fe35588cde49e49a6afbcf207a63d088e91543d75c8a967 - Sigstore transparency entry: 1288777743
- Sigstore integration time:
-
Permalink:
tomerramk/asciiify@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tomerramk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Trigger Event:
push
-
Statement type:
File details
Details for the file asciiify-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: asciiify-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 989.4 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26b18af4e41081ccec5cee954ffb8a7161885bd2d9579452f46fad3fda6f1a74
|
|
| MD5 |
46a949061ca499200c924d4be96cfc3e
|
|
| BLAKE2b-256 |
ec90f34a3910537ed2572409d1f50819b5687c16554eba3daac0bab1c961cd0f
|
Provenance
The following attestation bundles were made for asciiify-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on tomerramk/asciiify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asciiify-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
26b18af4e41081ccec5cee954ffb8a7161885bd2d9579452f46fad3fda6f1a74 - Sigstore transparency entry: 1288777644
- Sigstore integration time:
-
Permalink:
tomerramk/asciiify@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tomerramk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Trigger Event:
push
-
Statement type:
File details
Details for the file asciiify-0.2.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: asciiify-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 912.1 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06a1102cc93dfbffbad432690bfabdde3d4fd25a8b50a799ef59d2d0685914e2
|
|
| MD5 |
3d679757fa5df4abc454c4d47b7810ce
|
|
| BLAKE2b-256 |
c230db6e996a6263443f8dd93ea303832ff0b86f7753e3eb46be77e8b95d4066
|
Provenance
The following attestation bundles were made for asciiify-0.2.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on tomerramk/asciiify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asciiify-0.2.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
06a1102cc93dfbffbad432690bfabdde3d4fd25a8b50a799ef59d2d0685914e2 - Sigstore transparency entry: 1288777590
- Sigstore integration time:
-
Permalink:
tomerramk/asciiify@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tomerramk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Trigger Event:
push
-
Statement type:
File details
Details for the file asciiify-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: asciiify-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 974.5 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4a48568e1c1540d11f25e095f5d7ecee4b104e9a80a73dfae54257aedc4a8fd
|
|
| MD5 |
e393b430da4b99f9da18f3e81abc94fe
|
|
| BLAKE2b-256 |
1f3088463bfd276e15c338fd5bcba59a84c343b18a2d4efb11f0fd740244ef00
|
Provenance
The following attestation bundles were made for asciiify-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on tomerramk/asciiify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asciiify-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
a4a48568e1c1540d11f25e095f5d7ecee4b104e9a80a73dfae54257aedc4a8fd - Sigstore transparency entry: 1288777691
- Sigstore integration time:
-
Permalink:
tomerramk/asciiify@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tomerramk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa306b1b8b7856ad4bc59bdcf9e3dccc8a190f46 -
Trigger Event:
push
-
Statement type: