Prepare reading in files
This commit is contained in:
@@ -7,4 +7,5 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
clap = {version = "*", features = ["derive"]}
|
||||
image = "*"
|
||||
tool_helper = {path = "../tool_helper"}
|
@@ -1,4 +1,6 @@
|
||||
use clap::{Args, ValueEnum};
|
||||
use image::io::Reader as ImageReader;
|
||||
use std::io::Cursor;
|
||||
use tool_helper::{Error, Input, Output};
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
|
||||
@@ -14,6 +16,8 @@ pub struct Arguments {
|
||||
color_depth: ColorDepth
|
||||
}
|
||||
|
||||
pub fn convert(_args: Arguments, _input: Input, _output: Output) -> Result<(), Error> {
|
||||
pub fn convert(_args: Arguments, input: Input, _output: Output) -> Result<(), Error> {
|
||||
ImageReader::new(Cursor::new(tool_helper::input_to_vec(input)?));
|
||||
|
||||
Err(Error::new("Convert not implemented yet".to_owned(), Some(-2)))
|
||||
}
|
Reference in New Issue
Block a user