Skip to main content

EncoderConfigOverrides

Struct EncoderConfigOverrides 

Source
pub struct EncoderConfigOverrides {
    pub quality: Option<f32>,
    pub lossless: Option<bool>,
    pub method: Option<u8>,
    pub use_sharp_yuv: Option<bool>,
    pub autofilter: Option<bool>,
    pub alpha_quality: Option<u8>,
    pub preprocessing: Option<u8>,
    pub thread_level: Option<bool>,
    pub filter_strength: Option<i32>,
    pub filter_sharpness: Option<i32>,
    pub filter_type: Option<i32>,
}
Expand description

Optional per-frame configuration passed to libwebp.

Applications should choose their product policy explicitly. None means to retain the corresponding value supplied by WebPConfig::new().

Fields§

§quality: Option<f32>

Lossy quality in libwebp’s inclusive 0.0..=100.0 range.

§lossless: Option<bool>

Encode frames losslessly when Some(true) or lossy when Some(false).

§method: Option<u8>

libwebp encoding method in the inclusive 0..=6 range.

§use_sharp_yuv: Option<bool>

Use libwebp’s high-quality (and slower) RGB-to-YUV conversion.

§autofilter: Option<bool>

Let libwebp select the in-loop filter strength per frame.

§alpha_quality: Option<u8>

Alpha compression quality in the inclusive 0..=100 range.

§preprocessing: Option<u8>

libwebp preprocessing mode (0 disables it). Mode 2 introduces dithering, which can create temporal noise in animation.

§thread_level: Option<bool>

Ask libwebp to use its internal encoder threading when available.

§filter_strength: Option<i32>

Fixed in-loop filtering settings.

§filter_sharpness: Option<i32>

Fixed in-loop filter sharpness in libwebp’s 0..=7 range.

§filter_type: Option<i32>

In-loop filter type in libwebp’s 0..=1 range.

Trait Implementations§

Source§

impl Clone for EncoderConfigOverrides

Source§

fn clone(&self) -> EncoderConfigOverrides

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EncoderConfigOverrides

Source§

impl Debug for EncoderConfigOverrides

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EncoderConfigOverrides

Source§

fn default() -> EncoderConfigOverrides

Returns the “default value” for a type. Read more
Source§

impl PartialEq for EncoderConfigOverrides

Source§

fn eq(&self, other: &EncoderConfigOverrides) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EncoderConfigOverrides

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.