https://github.com/deflatedpickle/ptit
A CLI for turning images or videos into block text elements to view in the terminal
https://github.com/deflatedpickle/ptit
cli image terminal
Last synced: 10 months ago
JSON representation
A CLI for turning images or videos into block text elements to view in the terminal
- Host: GitHub
- URL: https://github.com/deflatedpickle/ptit
- Owner: DeflatedPickle
- License: mit
- Created: 2022-05-11T18:48:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-24T22:21:14.000Z (over 3 years ago)
- Last Synced: 2025-03-08T04:47:12.468Z (10 months ago)
- Topics: cli, image, terminal
- Language: Rust
- Homepage: https://crates.io/crates/ptit
- Size: 155 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ptit
> Put this in text
A CLI for turning images ~~or videos~~ into block text elements to view in the terminal
## Installation
### Cargo
> Requires a Rust install
```shell
cargo install ptit
```
## Usage
### URL
##### Input
```shell
ptit -cr url "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/132.png"
```
##### Output
[]
### File
##### Input
```shell
ptit -cr file "~/Downloads/63.png"
```
[]
## Flags
### Crop
Adding the `-c`/`--crop` flag will crop the image to it's content, removing all surrounding transparent pixels
#### Example
> Used in combination with `-r` to avoid large images
##### Without

##### With

### Resize
Using the `-r`/`--resize` flag will resize the image to fit to your terminal, either squashing or biggering the image
#### Example
> Used in combination with `-c` to avoid large images
##### Without

##### With

### Solid
Using the `-s`/`--solid` flag will stop dithering on pixels with an alpha of less than 255
> I had to use XTerm for these screenshots, hence bad colours
#### Example
##### Without

##### With
