mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Name crate correctly and add a simple test program
This commit is contained in:
parent
f92daa3fc3
commit
4728f22806
2
agb-image-converter/Cargo.lock
generated
2
agb-image-converter/Cargo.lock
generated
|
@ -15,7 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
|
checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "agb-image-converter"
|
name = "agb_image_converter"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"image",
|
"image",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "agb-image-converter"
|
name = "agb_image_converter"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Gwilym Kuiper <gw@ilym.me>"]
|
authors = ["Gwilym Kuiper <gw@ilym.me>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
15
agb-image-converter/src/bin/convert.rs
Normal file
15
agb-image-converter/src/bin/convert.rs
Normal file
|
@ -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(),
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in a new issue