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
Release history Release notifications | RSS feed
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
Close
Hashes for makeasciiart-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ed125ec7a7f994f2b4226d7ff90dd04925ccd5c41f5bf8f7722eafd642cbe2b |
|
MD5 | 39b43763314f4fcb8dfd39125c0e00a8 |
|
BLAKE2b-256 | 8e04d0b6e57bb19b4f38d432895e3b949a322ac50f36f22910ddddc370263b02 |