Skip to main content

Convert images and video to ASCII art

Project description

asciiify

Python library for converting images to ASCII art. Powered by Rust via PyO3.

Part of the asciiify project.

Install

pip install asciiify

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

asciiify-0.1.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distributions

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

asciiify-0.1.0-cp39-abi3-win_amd64.whl (806.1 kB view details)

Uploaded CPython 3.9+Windows x86-64

asciiify-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

asciiify-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (988.0 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

asciiify-0.1.0-cp39-abi3-macosx_11_0_arm64.whl (910.8 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

asciiify-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl (973.4 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file asciiify-0.1.0.tar.gz.

File metadata

  • Download URL: asciiify-0.1.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for asciiify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 46d403f9c61067ee5ba49b888bec6ffeef4439eebffbcb4ca55c37b19a9b1d8b
MD5 5e64b7bf5f044dcb62cf209319a443b6
BLAKE2b-256 55ab321326538d73346647680b1e42e4dc867d5308182a1da10d06dce9e3ca36

See more details on using hashes here.

Provenance

The following attestation bundles were made for asciiify-0.1.0.tar.gz:

Publisher: release.yml on tomerramk/asciiify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file asciiify-0.1.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: asciiify-0.1.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 806.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

Hashes for asciiify-0.1.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 496dc014833f33629d8f2721da48c3a0b71e0c664daa3b5359ceb5b1898f56d2
MD5 da4db8c6a9b2bb46aafc0a65c5873855
BLAKE2b-256 c6aff8963e3af4124fea66ecbac4d3c5c04e134ff0a83a2e49a3e416ad5228b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for asciiify-0.1.0-cp39-abi3-win_amd64.whl:

Publisher: release.yml on tomerramk/asciiify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file asciiify-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for asciiify-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03bc21bfb28cd6c80db846b3cdde30f64a74289982ed0f7cf8e8ecefa3cec2bc
MD5 ec8725b8d6bcac3e1ea838b441e8c2d9
BLAKE2b-256 b112c04fabbe80aa8b7b6bc0bcc5f9f071e49af5a63102cea0aa5b9913f1fb37

See more details on using hashes here.

Provenance

The following attestation bundles were made for asciiify-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on tomerramk/asciiify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file asciiify-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for asciiify-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 74cc60cdab252dc45bf45bec2c8a4da1b2dedb8f17de1c9eb1a185fa0e310e4f
MD5 3947b0c1d6876753e7784eda381e7f4a
BLAKE2b-256 c2261f95d946e110beba37e5d74f7fa23f164a638fdfb4d52078d5188791a389

See more details on using hashes here.

Provenance

The following attestation bundles were made for asciiify-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on tomerramk/asciiify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file asciiify-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for asciiify-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fe37d28ed28413f3ff7406e4131eaa1d975493b5c675a6ca9df2646dd603f818
MD5 c9f4f10fb34817be1203a4107b1a694b
BLAKE2b-256 ddc7d8e1166095859e5f69423960d110105887763aa68ce04441750e2c5f136a

See more details on using hashes here.

Provenance

The following attestation bundles were made for asciiify-0.1.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on tomerramk/asciiify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file asciiify-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for asciiify-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2cb900875f84342dea17dc3bbfda1a179063cd6918ed89a10d0ab1aca53172f5
MD5 d767c521034a9b97439b31a7d7b0b046
BLAKE2b-256 6de78743083ec25af3f0641ec3e9d71b93192822d26cbac70b4f84e0725a798c

See more details on using hashes here.

Provenance

The following attestation bundles were made for asciiify-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on tomerramk/asciiify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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