aboutsummaryrefslogtreecommitdiff
path: root/dhwt-codec/src/bin/export.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dhwt-codec/src/bin/export.rs')
-rw-r--r--dhwt-codec/src/bin/export.rs42
1 files changed, 0 insertions, 42 deletions
diff --git a/dhwt-codec/src/bin/export.rs b/dhwt-codec/src/bin/export.rs
deleted file mode 100644
index 73f3067..0000000
--- a/dhwt-codec/src/bin/export.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-use clap::Parser;
-use dhwt_codec::io::{infile, read_videobuf};
-use std::io::{stdout, BufWriter, Write};
-
-#[derive(Parser)]
-#[clap(about)]
-struct ExportArgs {
- #[arg(short)]
- x: usize,
- #[arg(short)]
- y: usize,
- #[arg(short)]
- z: usize,
-
- #[arg(short, long, default_value = "3")]
- channels: usize,
-
- infile: String,
-}
-
-fn main() {
- let args = ExportArgs::parse();
-
- let mut i = infile(&args.infile);
- let mut writer = BufWriter::new(stdout());
-
- let mut channels = vec![];
- for _ in 0..args.channels {
- channels.push(read_videobuf(&mut i))
- }
-
- for z in 0..args.z {
- for y in 0..args.y {
- for x in 0..args.x {
- for c in 0..args.channels {
- writer.write_all(&[channels[c][x][y][z] as u8]).unwrap();
- }
- }
- }
- }
- writer.flush().unwrap();
-}