turn pic to ascii with color
Project description
pic2ascc
A tool to print pictrue 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.1.tar.gz
(5.4 kB
view details)
Built Distribution
File details
Details for the file pic2asc-0.0.1.tar.gz
.
File metadata
- Download URL: pic2asc-0.0.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d72a2f742f5b7500cdb0ecb2a3beb8c708524fe189fb730269acc0ecf6c6c71 |
|
MD5 | 5d88eeafb00ccea4182fbc4446952546 |
|
BLAKE2b-256 | b19bcbae3e3e31f18209e6ed1541146e477219aaeedc35a6c9df53c60162b367 |
File details
Details for the file pic2asc-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pic2asc-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.8 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 | 8f3a900e8c29d1accc9d1f0de7430ad7a1a9b0281400cb51b7f55d74f5b42498 |
|
MD5 | 2bc5d28dffe575474e6f46384ac76365 |
|
BLAKE2b-256 | 8dac40b7cc031a4675ee912afae6aa1bc9f171efebac77fed30bbef2d00d7240 |