Skip to content

Commit

Permalink
[feat] make more easy to use
Browse files Browse the repository at this point in the history
  • Loading branch information
0x002500 authored Aug 28, 2023
1 parent d77b8f6 commit faf49fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use captrs::*;
use std::fs;
use shuteye::sleep;
use std::time::Duration;
use winapi::um::wingdi::{BITMAPFILEHEADER, BITMAPINFOHEADER};
Expand All @@ -10,6 +11,8 @@ pub fn serialize_row<T: Sized>(src: &T) -> &[u8] {
}

fn main() {
let nway = fs::create_dir("./pic");
let way = "./pic";
let mut capturer = Capturer::new(0).unwrap();

let (w, h) = capturer.geometry();
Expand All @@ -36,7 +39,7 @@ fn main() {
}

save_to_file(
format!("{}.bmp", i).as_str(),
format!("./pic/{}.bmp", i).as_str(),
&buf[..],
(w) as i32,
(h) as i32,
Expand Down

0 comments on commit faf49fc

Please sign in to comment.