Skip to content
Snippets Groups Projects
Verified Commit 790e2812 authored by Louis's avatar Louis :fire:
Browse files

Re-enable palette command

parent b2934963
No related branches found
No related tags found
No related merge requests found
[package] [package]
name = "crunch-cli" name = "crunch-cli"
version = "0.5.1" version = "0.5.2
edition = "2021" edition = "2021"
homepage = "https://microhacks.lcr.app/crunch/" homepage = "https://microhacks.lcr.app/crunch/"
......
...@@ -80,20 +80,20 @@ impl Args { ...@@ -80,20 +80,20 @@ impl Args {
.save_with_format(&flip.output, ImageFormat::Png) .save_with_format(&flip.output, ImageFormat::Png)
.map_err(anyhow::Error::from) .map_err(anyhow::Error::from)
} }
// Args::Remap(remap) => { Args::Remap(remap) => {
// let image_data = load_image(&remap.input, None)?; let image_data = load_image(&remap.input, None)?;
// let palette_data = load_image(&remap.palette, None)?; let palette_data = load_image(&remap.palette, None)?;
//
// let image_palette = Palette::extract_from(&image_data)?; let image_palette = Palette::extract_from(&image_data)?;
// let target_palette = Palette::extract_from(&palette_data)?; let target_palette = Palette::extract_from(&palette_data)?;
//
// let mappings = Palette::calculate_mapping(&image_palette, &target_palette); let mappings = Palette::calculate_mapping(&image_palette, &target_palette);
// let output = Remap::remap_image(image_data, mappings)?; let output = Remap::remap_image(image_data, mappings)?;
//
// output output
// .save_with_format(&remap.output, ImageFormat::Png) .save_with_format(&remap.output, ImageFormat::Png)
// .map_err(anyhow::Error::from) .map_err(anyhow::Error::from)
// } }
Args::Reduce(reduce) => { Args::Reduce(reduce) => {
if let Some(amount) = reduce.colours { if let Some(amount) = reduce.colours {
log::info!("Num cols {}", amount); log::info!("Num cols {}", amount);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment