Skip to content

Commit

Permalink
fix: update quantizer arguments #39
Browse files Browse the repository at this point in the history
Change the arguments for the `QuantizerCelebi::quantize` function, so that the score function can return an accurate color to the image.
  • Loading branch information
InioX committed Dec 23, 2023
1 parent fd262c1 commit 0147e64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn source_color_from_image(image: &String) -> Result<Vec<[u8; 4]>, Report> {

let pixels: Vec<[u8; 4]> = generate_pixels(&resized_img);

let theme = QuantizerCelebi::quantize(&mut QuantizerCelebi, &pixels, 1);
let theme = QuantizerCelebi::quantize(&mut QuantizerCelebi, &pixels, 128);

let score = score(&theme);

Expand Down

0 comments on commit 0147e64

Please sign in to comment.