diff --git a/Cargo.toml b/Cargo.toml index c22a010..53ceb69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/README.md b/README.md index 04fb86e..cd0545d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/args.rs b/src/args.rs index bb47bdb..38ce188 100644 --- a/src/args.rs +++ b/src/args.rs @@ -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)] diff --git a/src/effects.rs b/src/effects.rs index ad9a540..cb0f7fe 100644 --- a/src/effects.rs +++ b/src/effects.rs @@ -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); } diff --git a/src/main.rs b/src/main.rs index 492f940..42be167 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 {