Skip to content

Commit

Permalink
Pal len getter
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Jan 22, 2024
1 parent 3125533 commit c4fbe8f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/quant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,13 @@ impl QuantizationResult {
}
out
}

/// Expected length of the palette
///
/// Reads the length without finalizing the colors
pub fn palette_len(&mut self) -> usize {
self.palette.len()
}
}

fn sort_palette(attr: &Attributes, palette: &mut PalF) {
Expand Down

0 comments on commit c4fbe8f

Please sign in to comment.