Skip to main content

Convert image to ascii art

Project description

asciiart

Convert image to ascii art

Dependency

pip install opencv-python
pip install numpy

Usage

pip install img2ascii
import img2ascii as i2a

import numpy as np
import cv2

img2ascii.py

def img2ascii(filename, color_mode=True, fontsize=5):
return img,newimg # img : original image, newimg : ascii art image

Example 1

filename = 'test.jfif'
origin, newimg = i2a.img2ascii(filename)
if type(newimg) == type(None):
    exit()
cv2.imshow("origin", origin)
cv2.imshow("res", newimg)
cv2.waitKey()
cv2.destroyAllWindows()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

makeasciiart-0.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file makeasciiart-0.1-py3-none-any.whl.

File metadata

  • Download URL: makeasciiart-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

File hashes

Hashes for makeasciiart-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca8935128727bcc0bbe4ac669e528ae5ec400164314e446396251aacb38dd64a
MD5 40c74b8454d1582c310ac6da7b56f96c
BLAKE2b-256 7469be14874b84ddb19cf28cd87abfc905a037dc7238ebc511dc3de045f799f9

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