Name crate correctly and add a simple test program

This commit is contained in:
Gwilym Kuiper 2021-04-20 00:58:03 +01:00
parent f92daa3fc3
commit 4728f22806
3 changed files with 17 additions and 2 deletions

View file

@ -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",

View file

@ -1,5 +1,5 @@
[package]
name = "agb-image-converter"
name = "agb_image_converter"
version = "0.1.0"
authors = ["Gwilym Kuiper <gw@ilym.me>"]
edition = "2018"

View 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(),
});
}