Compare commits
2 Commits
07fc5c8448
...
fc87ea8835
Author | SHA1 | Date |
---|---|---|
Zynh0722 | fc87ea8835 | |
Zynh0722 | 9592a5dc27 |
File diff suppressed because it is too large
Load Diff
|
@ -6,3 +6,5 @@ edition = "2021"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
image = "0.25.1"
|
||||
imageproc = { version = "0.24.0", features = ["display-window"] }
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 701 KiB After Width: | Height: | Size: 212 KiB |
15
src/main.rs
15
src/main.rs
|
@ -1,3 +1,14 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
use std::error::Error;
|
||||
|
||||
use image::io::Reader as ImageReader;
|
||||
use imageproc::window::display_image;
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
let img = ImageReader::open("./assets/Xbox_Controller_Blank.png")?.decode()?;
|
||||
let img = img.into_rgba8();
|
||||
// println!("{:?}",);
|
||||
|
||||
display_image("Image", &img, 150, 151);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue