Image/Video to ASCII conversion
Project description
Image2ASCII
img2ascii is a library written in python which can convert image or video files to ASCII
Option list:
-h
or--help
: To generate this help text-m
or--mode
: Select the mode of operation --i
for image,v
for video andw
for webcam input-c
or--color
: Optional parameter to select color mode. 0 - B/W, 1 - Grayscale and 2 - RGB. Default color mode is B/W-k
or--kernel
: Optional parameter to set the kernel size, default is 7px-d
or--density
: Optional parameter to set the ASCII text density on image, default is 0.3 units; Range - (0,1) (exclusive)-i
or--ifile
: Path to the input file for image and video modes-o
or--ofile
: Path to the output file for image and video modes-s
or--cam_source
: Camera to be used for webcam mode. Use 0,1,2,3... to select cameras connected to the PC. Default value is 0
Installation:
- Direct install :
-
pip install img2ascii
- From Git :
1.
git clone https://github.com/gopaljigaur/img2ascii.git
2.cd img2ascii
3.python3 setup.py build
4.python3 setup.py install
Usage :
- For image :
img2ascii.py -m <mode>[i=image] -c[color mode (optional)] -i <inputfile> -o <outputfile> -k <kernel_size>[optional] -d <text_density>[optional]
- For video :
img2ascii.py -m <mode>[v=video] -c[color mode (optional)] -i <inputfile> -o <outputfile> -k <kernel_size>[optional] -d <text_density>[optional]
- For webcam :
img2ascii.py -m <mode>[w=webcam] -c[color mode (optional)] -k <kernel_size>[optional] -d <text_density>[optional -s <source_camera (0,1,2...)>[optional]
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
img2ascii-1.1.0.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for img2ascii-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f073059b844f4265fa10c46876f6ab3927e07acac564fb2753e5969a42e95fb2 |
|
MD5 | ff09e44216ae48fd6068f6df96c2754c |
|
BLAKE2b-256 | 0f42d4119f6e0da7d4a1713df9699996f56b51e64dcc4e8bc30ac70951b05263 |