From c3c69b160f4c5fd851fd1a49c01f633a56351f5d Mon Sep 17 00:00:00 2001 From: Julian T Date: Thu, 22 Jul 2021 21:36:15 +0200 Subject: Add smart image conversion --- src/main.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 06346a2..28fe0c9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,14 +1,23 @@ mod context; +mod picture; +mod piece; + use context::Context; +use picture::Picture; +use piece::Piece; fn main() { println!("Hello, world!"); let ctx = Context::new_with_args().unwrap(); - println!("{:?}", ctx); - for file in ctx.get_image_files().unwrap() { println!("{}", file.display()); + + let pic = Picture::new_from_file(&file).unwrap(); + println!("{:?}", pic); + + let piece = Piece::new(&ctx, pic).unwrap(); + println!("{:?}", piece); } } -- cgit v1.2.3