[][src]Trait image::imageops::colorops::ColorMap

pub trait ColorMap {
    type Color;
    fn index_of(&self, color: &Self::Color) -> usize;
fn map_color(&self, color: &mut Self::Color); }

A color map

Associated Types

type Color

The color type on which the map operates on

Loading content...

Required methods

fn index_of(&self, color: &Self::Color) -> usize

Returns the index of the closed match of color in the color map.

fn map_color(&self, color: &mut Self::Color)

Maps color to the closest color in the color map.

Loading content...

Implementors

impl ColorMap for BiLevel[src]

type Color = Luma<u8>

impl ColorMap for NeuQuant[src]

type Color = Rgba<u8>

Loading content...