ASCII art Python library
Project description
asciimage
A library designed in python to convert images into ascii paintings.
To install:
pip install asciimage
Table of Contents
Installation
The repository contains a zipped file of my Python package asciimage and should be installed via pip.
Instalation procedure: pip install asciimage
Motivation
The package is intended as a simple drawing tool that produces ASCII art.
The user will upload an image. The image has to be a jpg or png image. The image should have a nice contrast for proper output.
The package contains the function make_ascii_image() which produces ascii art
Example
This is the way to run the module:
from asciimage import *
from PIL import Image #import the module
image_path = r"input_image.jpg"
file_path = r"output.txt" #'output.txt' is the destination where the ASCII art will be stored
ascii_char = list(",.")
height = 400 #intended height of output file
width = 400 #intended width of output file
art = asciimage(image_path,file_path,ascii_char,height,width) #optional: ascii_char,height,width
art.make_ascii_image()
Sample
Input Image:
Output text file:
If you like the library, please consider giving it a star on Github :)
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 Distribution
Built Distribution
Hashes for asciimage-3.1415-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 672fa60845b7f83344c8214539bb315387abed414d29a1a248c693b9918f7b45 |
|
MD5 | cef08f74c263a72635853e7713c63493 |
|
BLAKE2b-256 | c56ca510d98ffb596cc7ecfd9657115a03ebec579d8bf23e429a7b5fcbe17cdf |