Skip to main content

Convert image to ascii art

Project description

makeasciiart

Let's make ascii art

Dependency

pip install opencv-python
pip install numpy

Usage

pip install makeasciiart
import makeasciiart

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

## Display
filename = 'test.jfif'
origin, newimg = makeasciiart.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.

Files for makeasciiart, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size makeasciiart-0.2-py3-none-any.whl (4.9 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page