-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c11c78b
commit 0e64584
Showing
17 changed files
with
1,017 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
use sss_lib::{generate_image, DynImageContent, GenerationSettings, Shadow}; | ||
|
||
struct Screenshot; | ||
|
||
impl DynImageContent for Screenshot { | ||
fn content(&self) -> sss_lib::image::DynamicImage { | ||
let binding = screenshots::Screen::all().unwrap(); | ||
let screens = binding.last().unwrap(); | ||
let img = screens.capture().unwrap(); | ||
sss_lib::image::DynamicImage::ImageRgba8(img) | ||
} | ||
} | ||
|
||
fn main() { | ||
println!("Hello, world!"); | ||
let img = generate_image(GenerationSettings { | ||
shadow: Some(Shadow::default()), | ||
..Default::default() | ||
}, Screenshot); | ||
|
||
img.save("./algo.png").unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.