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

Method remap_into

src/quant.rs:264–270  ·  view source on GitHub ↗
(&mut self, image: &mut Image<'_>, output_buf: &mut [MaybeUninit<PalIndexRemap>])

Source from the content-addressed store, hash-verified

262 /// because remapping refines the palette.
263 #[inline]
264 pub fn remap_into(&mut self, image: &mut Image<'_>, output_buf: &mut [MaybeUninit<PalIndexRemap>]) -> Result<(), Error> {
265 let required_size = (image.width()) * (image.height());
266 let output_buf = output_buf.get_mut(0..required_size).ok_or(BufferTooSmall)?;
267
268 let rows = RowBitmapMut::new_contiguous(output_buf, image.width());
269 self.write_remapped_image_rows_internal(image, rows)
270 }
271
272 /// The final palette, copied.
273 ///

Callers 3

remap_ordFunction · 0.80
remap_floydFunction · 0.80
remap_into_vecMethod · 0.80

Calls 3

widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected