MCPcopy Create free account
hub / github.com/ImageOptim/libimagequant / push

Method push

src/pal.rs:237–240  ·  view source on GitHub ↗
(&mut self, color: f_pixel, popularity: PalPop)

Source from the content-addressed store, hash-verified

235
236 #[inline(always)]
237 pub fn push(&mut self, color: f_pixel, popularity: PalPop) {
238 self.pops.push(popularity);
239 self.colors.push(color);
240 }
241
242 pub fn set(&mut self, idx: usize, color: f_pixel, popularity: PalPop) {
243 debug_assert!(idx < self.colors.len() && idx < self.pops.len());

Callers 6

into_paletteMethod · 0.80
palette_from_histogramFunction · 0.80
push_in_capMethod · 0.80
pal_testFunction · 0.80
largepalFunction · 0.80

Calls

no outgoing calls

Tested by 1

pal_testFunction · 0.64