mirror of
https://github.com/waveplate/img2irc.git
synced 2025-04-23 21:26:54 +00:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
33d8702f5a | ||
![]() |
df2a135437 | ||
![]() |
2459c6e06c | ||
![]() |
4724956862 | ||
![]() |
3577cf95a2 | ||
![]() |
148f809623 |
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "img2irc-rs"
|
name = "img2irc-rs"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
authors = ["waveplate"]
|
authors = ["waveplate"]
|
||||||
github = "https://github.com/waveplate/img2irc"
|
github = "https://github.com/waveplate/img2irc"
|
||||||
repository = "https://github.com/waveplate/img2irc"
|
repository = "https://github.com/waveplate/img2irc"
|
||||||
|
18
README.md
18
README.md
@ -1,4 +1,6 @@
|
|||||||
# img2irc (1.1.0)
|
# img2irc (1.1.1)
|
||||||
|
|
||||||
|

|
||||||

|

|
||||||
|
|
||||||
*img2irc* is a premiere command-line utility which converts images to irc/ansi art, with a lot of post-processing filters
|
*img2irc* is a premiere command-line utility which converts images to irc/ansi art, with a lot of post-processing filters
|
||||||
@ -10,18 +12,18 @@
|
|||||||
statically linked with musl, works on all x86_64 linux platforms
|
statically linked with musl, works on all x86_64 linux platforms
|
||||||
|
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget https://github.com/waveplate/img2irc/releases/download/v1.1.0/img2irc-1.1.0-linux-x86_64.tar.gz
|
wget https://github.com/waveplate/img2irc/releases/download/v1.1.1/img2irc-1.1.1-linux-x86_64.tar.gz
|
||||||
sudo tar -xzf img2irc-1.1.0-linux-x86_64.tar.gz -C /usr/local/bin --strip-components=1 img2irc-1.1.0/img2irc
|
sudo tar -xzf img2irc-1.1.1-linux-x86_64.tar.gz -C /usr/local/bin --strip-components=1 img2irc-1.1.1/img2irc
|
||||||
rm -rf img2irc-1.1.0-linux-x86_64.tar.gz
|
rm -rf img2irc-1.1.1-linux-x86_64.tar.gz
|
||||||
|
|
||||||
|
|
||||||
- ### install with `yay` (arch linux)
|
- ### install with `yay` (arch linux)
|
||||||
|
|
||||||
|
yay -S img2irc
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> if you like this project, i would appreciate you giving it a vote on the [aur](https://aur.archlinux.org/packages/img2irc)!
|
> if you like this project, i would appreciate you giving it a vote on the [aur](https://aur.archlinux.org/packages/img2irc)!
|
||||||
|
|
||||||
yay -S img2irc
|
|
||||||
|
|
||||||
- ### install with `cargo`
|
- ### install with `cargo`
|
||||||
|
|
||||||
cargo install img2irc-rs
|
cargo install img2irc-rs
|
||||||
@ -36,7 +38,7 @@
|
|||||||
|----------------------------------------|---------------------------------------------------------------|---------------|
|
|----------------------------------------|---------------------------------------------------------------|---------------|
|
||||||
| image | image url or file path | required |
|
| image | image url or file path | required |
|
||||||
| -w, --width | output image width in columns | auto |
|
| -w, --width | output image width in columns | auto |
|
||||||
| -h, --height | output image height in rows | auto |
|
| -H, --height | output image height in rows | auto |
|
||||||
| --scale | scaling factors (x:y, e.g., "2:2") | none |
|
| --scale | scaling factors (x:y, e.g., "2:2") | none |
|
||||||
| --aspect | final aspect ratio (x:y, e.g., "2:1") | none |
|
| --aspect | final aspect ratio (x:y, e.g., "2:1") | none |
|
||||||
| --crop | crop image ("x1,y1,x2,y2") | none |
|
| --crop | crop image ("x1,y1,x2,y2") | none |
|
||||||
@ -118,3 +120,5 @@
|
|||||||
| --frostedglass | blurred, frosted appearance as if viewed through semi-transparent surface | false |
|
| --frostedglass | blurred, frosted appearance as if viewed through semi-transparent surface | false |
|
||||||
| --solarize | strange, otherworldly appearance with inverted colors and surreal atmosphere | false |
|
| --solarize | strange, otherworldly appearance with inverted colors and surreal atmosphere | false |
|
||||||
| --edgedetection | highlights edges and boundaries in an image | false |
|
| --edgedetection | highlights edges and boundaries in an image | false |
|
||||||
|
|
||||||
|

|
||||||
|
@ -25,11 +25,11 @@ pub struct Args {
|
|||||||
pub image: String,
|
pub image: String,
|
||||||
|
|
||||||
/// output image width in columns
|
/// output image width in columns
|
||||||
#[arg(short, long)]
|
#[arg(short = 'w', long)]
|
||||||
pub width: Option<u32>,
|
pub width: Option<u32>,
|
||||||
|
|
||||||
/// output image height in rows
|
/// output image height in rows
|
||||||
#[arg(short, long)]
|
#[arg(short = 'H', long)]
|
||||||
pub height: Option<u32>,
|
pub height: Option<u32>,
|
||||||
|
|
||||||
/// scaling factors (x:y, e.g., "2:2")
|
/// scaling factors (x:y, e.g., "2:2")
|
||||||
|
@ -715,7 +715,7 @@ pub fn irc_draw_braille(image_luma: &AnsiImage, image_chroma: &AnsiImage, args:
|
|||||||
let scaled_threshold = min_luma + (luma_range / 2);
|
let scaled_threshold = min_luma + (luma_range / 2);
|
||||||
|
|
||||||
for y in (0..height).step_by(4) {
|
for y in (0..height).step_by(4) {
|
||||||
let mut last_fg = 255u8;
|
let mut last_fg = 1u8;
|
||||||
let mut first = true;
|
let mut first = true;
|
||||||
for x in (0..width).step_by(2) {
|
for x in (0..width).step_by(2) {
|
||||||
let mut braille_char = 0x2800;
|
let mut braille_char = 0x2800;
|
||||||
|
Loading…
Reference in New Issue
Block a user