pub trait ColorCountsRemap<Color, Component, const N: usize>: ColorCounts<Color, Component, N>
where Color: ColorComponents<Component, N>,
{ // Required method fn map_indices(&self, indices: Vec<u8>) -> Vec<u8>; }
Expand description

Types that allow reconstructing the original image/color slice from a Vec of indices into a color palette.

Required Methods§

source

fn map_indices(&self, indices: Vec<u8>) -> Vec<u8>

Uses the given Vec of indices to create indices for each pixel/color in the original image/color slice.

The given Vec will have the same length as the color slice returned by colors.

The length of the returned Vec must not be greater than MAX_PIXELS.

Implementors§

source§

impl<'a, Color, Component, const N: usize> ColorCountsRemap<Color, Component, N> for ColorSlice<'a, Color>
where Color: ColorComponents<Component, N>,

source§

impl<Color, Component, const N: usize> ColorCountsRemap<Color, Component, N> for IndexedColorCounts<Color, Component, N>
where Color: ColorComponents<Component, N>,