diff --git a/agb-image-converter/Cargo.lock b/agb-image-converter/Cargo.lock index ca3183df..e81e9ed8 100644 --- a/agb-image-converter/Cargo.lock +++ b/agb-image-converter/Cargo.lock @@ -15,7 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" [[package]] -name = "agb-image-converter" +name = "agb_image_converter" version = "0.1.0" dependencies = [ "image", diff --git a/agb-image-converter/Cargo.toml b/agb-image-converter/Cargo.toml index 3635cf2d..2be58b95 100644 --- a/agb-image-converter/Cargo.toml +++ b/agb-image-converter/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "agb-image-converter" +name = "agb_image_converter" version = "0.1.0" authors = ["Gwilym Kuiper "] edition = "2018" diff --git a/agb-image-converter/src/bin/convert.rs b/agb-image-converter/src/bin/convert.rs new file mode 100644 index 00000000..0e7d3206 --- /dev/null +++ b/agb-image-converter/src/bin/convert.rs @@ -0,0 +1,15 @@ +use std::env; + +use agb_image_converter::{convert_image, ImageConverterConfig, TileSize}; + +fn main() -> () { + let args: Vec<_> = env::args().collect(); + + let file_path = &args[1]; + convert_image(&ImageConverterConfig { + transparent_colour: None, + tile_size: TileSize::Tile8, + input_image: file_path.into(), + output_file: "".into(), + }); +}