Skip to content

Commit c4fbe8f

Browse files
committed
Pal len getter
1 parent 3125533 commit c4fbe8f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/quant.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,13 @@ impl QuantizationResult {
286286
}
287287
out
288288
}
289+
290+
/// Expected length of the palette
291+
///
292+
/// Reads the length without finalizing the colors
293+
pub fn palette_len(&mut self) -> usize {
294+
self.palette.len()
295+
}
289296
}
290297

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

0 commit comments

Comments
 (0)