use image_similarity::mutators::get_all_mutators;
use clap::Parser;

#[derive(Parser)]
#[command(version, about, long_about = None)]
struct Cfg {
	/// Path to the image
	path: String,
	/// Try to output the images to terminal with viuer
	#[arg(short, long, default_value_t=false)]
	show_images: bool,
}

fn main() {
	env_logger::init();

	let cfg = Cfg::parse();

	let img = image::open(cfg.path)
		.expect("Unable to open file");

	let mutators = get_all_mutators();

	for mutator in mutators {
		let mutated = mutator.mutate(&img);
		let filename = "mut".to_string() + &mutator.tag() + "png";
		println!("Saving to {filename}");
		mutated.save(filename).expect("Saving image failed");
	}
}