summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-07-22 21:36:15 +0200
committerJulian T <julian@jtle.dk>2021-07-22 21:36:15 +0200
commitc3c69b160f4c5fd851fd1a49c01f633a56351f5d (patch)
tree55cdca5f052717d1c7f9abab97e864f28dc17534 /src/main.rs
parent69bbd4ed3804833b15285cf8637e96e59135f223 (diff)
Add smart image conversion
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs13
1 files changed, 11 insertions, 2 deletions
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);
}
}