[−][src]Struct imagequant::QuantizationResult
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]
&mut self,
image: &mut Image<'_>
) -> Result<(Vec<Color>, Vec<u8>), liq_error>
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
impl RefUnwindSafe for QuantizationResult
[src]
impl !Sync for QuantizationResult
[src]
impl Unpin for QuantizationResult
[src]
impl UnwindSafe for QuantizationResult
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,