Update webapp

This commit is contained in:
Chris Tsang
2024-05-29 14:35:05 +01:00
parent f35df1f6b2
commit 148328da45
9 changed files with 78 additions and 70 deletions

View File

@@ -77,7 +77,7 @@ impl BinaryImageConverter {
self.params.max_iterations,
self.params.splice_threshold
);
let color = Color::color(&ColorName::White);
let color = Color::color(&ColorName::Black);
self.svg.prepend_path(
&paths,
&color,

View File

@@ -1,6 +1,6 @@
use wasm_bindgen::prelude::*;
use visioncortex::PathSimplifyMode;
use visioncortex::color_clusters::{IncrementalBuilder, Clusters, Runner, RunnerConfig, HIERARCHICAL_MAX};
use visioncortex::color_clusters::{Clusters, Runner, RunnerConfig, HIERARCHICAL_MAX, IncrementalBuilder, KeyingAction};
use crate::canvas::*;
use crate::svg::*;
@@ -78,6 +78,8 @@ impl ColorImageConverter {
is_same_color_b: 1,
deepen_diff: self.params.layer_difference,
hollow_neighbours: 1,
key_color: Default::default(),
keying_action: KeyingAction::Discard,
}, image);
self.stage = Stage::Clustering(runner.start());
}
@@ -108,6 +110,8 @@ impl ColorImageConverter {
is_same_color_b: 1,
deepen_diff: 0,
hollow_neighbours: 0,
key_color: Default::default(),
keying_action: KeyingAction::Discard,
}, image);
self.stage = Stage::Reclustering(runner.start());
},