turn pic to ascii with color
Project description
pic2asc
A tool to print picture on your terminal or into file
install
pip install pic2asc
require python 3.12+, beacuse I use type
Usage
use in cmd
usage: pic2asc [-h] [--size WIDTH HEIGHT] [--no-color] [--mode {3bit,4bit,256bit}] [--file FILE] [--replace-str REPLACE_STR] path
positional arguments:
path pictrue path
options:
-h, --help show this help message and exit
--size WIDTH HEIGHT size of asciipic. like --size 50 50. defalut is your terminal witdh/2, it is because two char with eque one char height
--no-color print no color ascii picture
--mod {3bit,4bit,256bit}
3bit 4bit or regular RGB mod
--file FILE print ascii into file
--replace-str REPLACE_STR
the chr you wang to show on the ascii pic, the string will be mapped to 0-255 in order
use as module
from pic2asc import pic2asc, color_type
p = pic2asc("path",show_color=False,mod = color_type.bit4)
p.pic2ascii(size=(50,50))
Example
picture:
-
color_type.bit3
-
color_type.bit4
-
color_type.bit256(default)
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
pic2asc-0.0.2.tar.gz
(249.8 kB
view details)
Built Distribution
File details
Details for the file pic2asc-0.0.2.tar.gz
.
File metadata
- Download URL: pic2asc-0.0.2.tar.gz
- Upload date:
- Size: 249.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58afa0be226486d4422d5a27ea4d6d55a114d60b95794aaaf5ee54fbfd65dac6 |
|
MD5 | 94fbf44a9e22c6c0f8507399097d6e16 |
|
BLAKE2b-256 | 25695dabb75670f314cb71f40329e6a7dfd6bc80c3687ec3b7e7b55e9c8b0117 |
File details
Details for the file pic2asc-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pic2asc-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62c297a42f1ac03a8f020372bcec7071ab2db8dbc328b1aae3da2b5fbb0f26a5 |
|
MD5 | 33587853e4a24761156a9065a6a9f0d3 |
|
BLAKE2b-256 | db86c1443d4652f9373698889d79fb014b62185cc7b3b5ee3692a59717d8e4aa |