pub trait ColorDepth {
    fn convert_image_with_loss(
        &self,
        image: &RgbImage,
        num_colors: Option<u32>
    ) -> (Vec<Color>, u64); fn convert_image(
        &self,
        image: &RgbImage,
        num_colors: Option<u32>
    ) -> Vec<Color> { ... } fn loss(&self, image: &RgbImage, num_colors: Option<u32>) -> u64 { ... } }
Expand description

Color depth image converter.

Required Methods

Convert and retrieve the loss from converting an image.

Provided Methods

Convert an RGB image to this color depth.

Estimate the loss obtained from converting an image. For the best results, greater discrepancies should result in higher loss values.

Implementations on Foreign Types

Convert an RGB image to this color depth.

Estimate the loss obtained from converting an image. For the best results, greater discrepancies should result in higher loss values.

Implementors