diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2023-07-08 17:18:57 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2023-07-08 17:18:57 -0400 |
commit | 14548ad9946d60a0d28f3ac604b217a467c0be05 (patch) | |
tree | 8c8e646626dfe1bfe7e8afb0a8155141641a5e88 | |
parent | 772a349c26603c6306f380d0635a4f7b4587a2ef (diff) |
convert dashboard to grayscale
-rw-r--r-- | flake.nix | 1 | ||||
-rw-r--r-- | src/main.rs | 6 |
2 files changed, 7 insertions, 0 deletions
@@ -145,6 +145,7 @@ geckodriver pkg-config openssl + imagemagick ]; }; }); diff --git a/src/main.rs b/src/main.rs index 230da83..b3635ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,6 +43,12 @@ async fn main() -> Result<(), Box<dyn Error>> { let output_path = Path::new(&args.path); let tmp_path = output_path.with_extension("png.tmp"); fs::write(&tmp_path, img)?; + + Command::new("mogrify") + .arg("-colorspace") + .arg("gray") + .arg(tmp_path.as_os_str()) + .spawn()?.wait()?; fs::rename(&tmp_path, output_path)?; time::sleep(Duration::from_secs(15)).await; info!("Wrote {}", output_path.display()); |