Skip to content

Commit

Permalink
fix: spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
ozwaldorf committed Jul 8, 2023
1 parent 00a5a37 commit 218a7eb
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions src/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,31 +51,32 @@ struct LutArgs {
#[arg(short, long, value_enum, default_value = "gaussian-rbf")]
#[clap(global = true)]
algorithm: Algorithm,
/// Number of nearest palette colors to consider at any given time for RBF based algorithms.
/// 0 uses unlimited (all) colors.
/// Luminosity factor for all algorithms. Used for weighting the luminocity vs color channels
/// when computing color distances.
///
/// Factors greater than 1 will result in more "greyscale" colors, and factors less than 1
/// gives a more colorful hald clut.
#[arg(
short,
long,
default_value_t = 16,
long = "lum",
default_value_t = 1.0,
conflicts_with = "mean",
conflicts_with = "std_dev",
conflicts_with = "iterations"
)]
#[clap(global = true)]
nearest: usize,
/// Luminocity factor. Used for weighting luminocity vs color when computing color distances.
///
/// Factors greater than 1 will result in more "greyscale" colors, and factors less than 1
/// gives a more colorful hald clut.
luminosity: f64,
/// Number of nearest palette colors to consider at any given time for RBF based algorithms.
/// 0 uses unlimited (all) colors.
#[arg(
long = "lum",
default_value_t = 1.0,
short,
long,
default_value_t = 16,
conflicts_with = "mean",
conflicts_with = "std_dev",
conflicts_with = "iterations"
)]
#[clap(global = true)]
luminocity: f64,
nearest: usize,
/// Gaussian RBF's shape parameter.
/// Higher means less gradient between colors, lower mean more.
#[arg(
Expand Down Expand Up @@ -171,28 +172,28 @@ impl LutArgs {

let lut = match self.algorithm {
Algorithm::ShepardsMethod => {
ShepardRemapper::new(&self.collect(), self.power, self.nearest, self.luminocity)
ShepardRemapper::new(&self.collect(), self.power, self.nearest, self.luminosity)
.generate_lut(self.level)
},
Algorithm::GaussianRBF => {
GaussianRemapper::new(&self.collect(), self.shape, self.nearest, self.luminocity)
GaussianRemapper::new(&self.collect(), self.shape, self.nearest, self.luminosity)
.generate_lut(self.level)
},
Algorithm::LinearRBF => {
LinearRemapper::new(&self.collect(), self.nearest, self.luminocity)
LinearRemapper::new(&self.collect(), self.nearest, self.luminosity)
.generate_lut(self.level)
},
Algorithm::GaussianSampling => GaussianSamplingRemapper::new(
&self.collect(),
self.mean,
self.std_dev,
self.iterations,
self.luminocity,
self.luminosity,
SEED,
)
.generate_lut(self.level),
Algorithm::NearestNeighbor => {
NearestNeighborRemapper::new(&self.collect(), self.luminocity)
NearestNeighborRemapper::new(&self.collect(), self.luminosity)
.generate_lut(self.level)
},
};
Expand Down

0 comments on commit 218a7eb

Please sign in to comment.