Skip to content

Commit

Permalink
Lower MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Aug 5, 2024
1 parent d6514e8 commit 869aa5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "imagequant"
version = "4.3.2"
version = "4.3.3"
description = "Convert 24/32-bit images to 8-bit palette with alpha channel.\nFor lossy PNG compression and high-quality GIF images\nDual-licensed like pngquant. See https://pngquant.org for details."
authors = ["Kornel Lesiński <kornel@pngquant.org>"]
license = "GPL-3.0-or-later"
Expand Down Expand Up @@ -38,7 +38,7 @@ thread_local = { version = "1.1.8", optional = true }
once_cell = "1.19.0"

[dev-dependencies]
lodepng = "3.10.4"
lodepng = "3.10"

[workspace]
members = ["imagequant-sys", "imagequant-sys/c_test"]
Expand Down
2 changes: 1 addition & 1 deletion src/kmeans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn replace_unused_colors(palette: &mut PalF, hist: &HistogramInternal) -> Result
let colors = palette.as_slice();
// the search is just for diff, ignoring adjusted_weight,
// because the palette already optimizes for the max weight, so it'd likely find another redundant entry.
for item in &hist.items {
for item in hist.items.iter() {
// the early reject avoids running full palette search for every entry
let may_be_worst = colors.get(item.likely_palette_index() as usize)
.map_or(true, |pal| pal.diff(&item.color) > worst_diff);
Expand Down
2 changes: 1 addition & 1 deletion src/quant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ fn refine_palette(palette: &mut PalF, attr: &Attributes, hist: &mut HistogramInt
#[cold]
fn palette_from_histogram(hist: &HistogramInternal, max_colors: PalLen) -> (PalF, Option<f64>) {
let mut hist_pal = PalF::new();
for item in &hist.items {
for item in hist.items.iter() {
hist_pal.push(item.color, PalPop::new(item.perceptual_weight));
}

Expand Down

0 comments on commit 869aa5b

Please sign in to comment.