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

Method remapped

src/quant.rs:231–235  ·  view source on GitHub ↗

Remap image into a palette + indices. Returns the palette and a 1-byte-per-pixel uncompressed bitmap

(&mut self, image: &mut Image<'_>)

Source from the content-addressed store, hash-verified

229 ///
230 /// Returns the palette and a 1-byte-per-pixel uncompressed bitmap
231 pub fn remapped(&mut self, image: &mut Image<'_>) -> Result<(Vec<RGBA>, Vec<PalIndexRemap>), Error> {
232 let mut buf = Vec::new();
233 let pal = self.remap_into_vec(image, &mut buf)?;
234 Ok((pal, buf))
235 }
236
237 /// Remap image into an existing buffer. Use [`remapped()`][Self::remapped] if you don't have a pre-allocated buffer to reuse.
238 ///

Callers 3

poke_itFunction · 0.80
background_to_nopFunction · 0.80
mainFunction · 0.80

Calls 2

newFunction · 0.85
remap_into_vecMethod · 0.80

Tested by 2

poke_itFunction · 0.64
background_to_nopFunction · 0.64