[][src]Struct imagequant::QuantizationResult

pub struct QuantizationResult { /* fields omitted */ }

Palette inside.

Implementations

impl QuantizationResult[src]

pub fn set_dithering_level(&mut self, value: f32) -> liq_error[src]

Set to 1.0 to get nice smooth image

pub fn set_output_gamma(&mut self, value: f64) -> liq_error[src]

The default is sRGB gamma (~1/2.2)

pub fn output_gamma(&mut self) -> f64[src]

Approximate gamma correction value used for the output

Colors are converted from input gamma to this gamma

pub fn quantization_quality(&self) -> i32[src]

Number 0-100 guessing how nice the input image will look if remapped to this palette

pub fn quantization_error(&self) -> Option<f64>[src]

Approximate mean square error of the palette

pub fn palette(&mut self) -> Vec<Color>[src]

Final palette

It's slighly better if you get palette from the remapped() call instead

pub fn remapped(
    &mut self,
    image: &mut Image<'_>
) -> Result<(Vec<Color>, Vec<u8>), liq_error>
[src]

Remap image

Returns palette and 1-byte-per-pixel uncompresed bitmap

Trait Implementations

impl Debug for QuantizationResult[src]

impl Drop for QuantizationResult[src]

impl Send for QuantizationResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.