This commit is contained in:
Waveplate 2025-05-15 23:16:37 -07:00
parent 10dba8b108
commit 52aed776fb
5 changed files with 10 additions and 13 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "img2irc-rs"
version = "1.3.0"
version = "1.3.1"
authors = ["waveplate"]
github = "https://github.com/waveplate/img2irc"
repository = "https://github.com/waveplate/img2irc"
@ -25,8 +25,7 @@ path = "src/main.rs"
[dependencies]
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"] }
reqwest = "0.11.14"
photon-rs = { version = "0.3.2", default-features = false, git = "https://github.com/silvia-odwyer/photon", rev = "3b72d357848cd76be9363e87ad0cd02a19b988d2" }
#photon-rs = "0.3.2"
photon-rs = "0.3.3"
clap = { version = "4.2.0", features = ["cargo", "derive"] }
url = "2.3.1"
atty = "0.2.14"

View File

@ -1,8 +1,8 @@
### img2irc (1.3.0)
### img2irc (1.3.1)
*img2irc* is a premiere command-line utility which converts images to irc/ansi art, with a lot of post-processing filters
`$ img2irc https://i.imgur.com/B9syzEm.png --render ansi --blocks --width 132 --contrast 50 --nograyscale`
`$ img2irc https://i.imgur.com/WWSl2Sb.png --render ansi --blocks --width 132 --contrast 50 --nograyscale`
>  
>![img2irc block example](https://i.imgur.com/B9syzEm.png)
@ -14,7 +14,7 @@
installs `img2irc` to `/usr/local/bin`
curl -sL https://github.com/waveplate/img2irc/releases/download/v1.3.0/img2irc-1.3.0-linux-x86_64.tar.gz | sudo tar -xzf - --strip-components=1 -C /usr/local/bin img2irc-1.3.0/img2irc
curl -sL https://github.com/waveplate/img2irc/releases/download/v1.3.1/img2irc-1.3.1-linux-x86_64.tar.gz | sudo tar -xzf - --strip-components=1 -C /usr/local/bin img2irc-1.3.1/img2irc
statically linked with musl, works on all x86_64 linux platforms

View File

@ -65,8 +65,8 @@ pub struct Args {
pub filter: SamplingFilter,
/// rotate degrees
#[arg(long, default_value_t = 0)]
pub rotate: i32,
#[arg(long, default_value_t = 0.00)]
pub rotate: f32,
/// flip horizontal
#[arg(long, default_value_t = false)]

View File

@ -74,8 +74,8 @@ pub fn apply_effects(
) -> PhotonImage {
let (width, height) = calculate_dimensions(args, &photon_image);
if args.rotate != 0 {
photon_image = rotate(&photon_image, args.rotate as i32);
if args.rotate != 0.00 {
photon_image = rotate(&photon_image, args.rotate);
}
if args.fliph {
@ -267,7 +267,7 @@ pub fn apply_effects(
pub fn apply_luma_effects(args: &args::Args, mut photon_image: PhotonImage) -> PhotonImage {
let (width, height) = calculate_dimensions(args, &photon_image);
if args.rotate != 0 {
if args.rotate != 0.00 {
photon_image = rotate(&photon_image, args.rotate);
}

View File

@ -21,8 +21,6 @@ async fn main() {
let canvas_luma = draw::AnsiImage::new(image_luma.clone());
let canvas_chroma = draw::AnsiImage::new(image_chroma.clone());
eprintln!("Render mode: {:?}", args.render);
if args.braille {
// Braille rendering
match args.render {