From fb78c5ceee73bcdb6a97acf8961e508d75369e97 Mon Sep 17 00:00:00 2001 From: super1207 <1875159423@qq.com> Date: Sun, 6 Aug 2023 17:55:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.toml | 42 +++++++++++++++++++++--------------------- src/redlang/exfun.rs | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4b2b910..2caaf8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,41 +10,41 @@ fancy-regex = "0.11.0" encoding = "0.2.33" rand = "0.8.5" getrandom = "0.2.8" -base64 = "0.21.0" -serde_json = "1.0.95" -uuid = {version = "1.3.0",features = ["v4","fast-rng"]} +base64 = "0.21.2" +serde_json = "1.0.104" +uuid = {version = "1.4.1",features = ["v4","fast-rng"]} lazy_static = "1.4.0" -chrono = "0.4.24" +chrono = "0.4.26" md-5 = "0.10.5" rcnb-rs = "0.1.0" -rust-embed="6.6.1" +rust-embed="6.8.1" image = "0.24.6" imageproc = "0.23.0" gif = "0.12.0" cron = "0.12.0" -hyper = { version = "0.14.25",default-features = false,features = ["server"]} -tokio = { version = "1.27.0",default-features = false,features = ["macros","fs","rt-multi-thread"] } -url = "2.3.1" -futures-util = "0.3.27" -hyper-tungstenite = "0.9.0" -tokio-tungstenite = "0.18.0" -scopeguard = "1.1.0" -log = "0.4.17" +hyper = { version = "0.14.27",default-features = false,features = ["server"]} +tokio = { version = "1.29.1",default-features = false,features = ["macros","fs","rt-multi-thread"] } +url = "2.4.0" +futures-util = "0.3.28" +hyper-tungstenite = "0.11.1" +tokio-tungstenite = "0.20.0" +scopeguard = "1.2.0" +log = "0.4.19" tracing = "0.1.37" -tracing-subscriber = { version = "0.3.16", features = ["env-filter","time","local-time"]} -opener = "0.6.0" +tracing-subscriber = { version = "0.3.17", features = ["env-filter","time","local-time"]} +opener = "0.6.1" rusqlite = {version = "0.29.0",features = ["bundled"]} -sevenz-rust = "0.2.9" -jsonpath-rust = "0.2.6" +sevenz-rust = "0.4.3" +jsonpath-rust = "0.3.1" rusttype = "0.9.3" markdown = "1.0.0-alpha.7" -reqwest = {version = "0.11.16",default-features = false,features = ["rustls-tls"]} -time = { version = "0.3", features = ["formatting", "macros"] } +reqwest = {version = "0.11.18",default-features = false,features = ["rustls-tls"]} +time = { version = "0.3.25", features = ["formatting", "macros"] } [target.'cfg(windows)'.dependencies] -headless_chrome = {version="*",default-features = false} +headless_chrome = {version="1.0.5",default-features = false} winreg = "0.50.0" -screenshots = "0.5.3" +screenshots = "0.7.1" diff --git a/src/redlang/exfun.rs b/src/redlang/exfun.rs index 9364706..51d9b9e 100644 --- a/src/redlang/exfun.rs +++ b/src/redlang/exfun.rs @@ -1441,7 +1441,7 @@ pub fn init_ex_fun_map() { let screens = screenshots::Screen::all()?; if screens.len() > 0 { let image = screens[0].capture()?; - let buffer = image.buffer(); + let buffer = image.to_png(None)?; return Ok(Some(self_t.build_bin(buffer.to_vec()))); } return Ok(Some(self_t.build_bin(vec![])));