Struct webp_animation::LossyEncodingConfig[][src]

pub struct LossyEncodingConfig {
Show fields pub target_size: usize, pub target_psnr: f32, pub segments: usize, pub sns_strength: usize, pub filter_strength: usize, pub filter_sharpness: usize, pub filter_type: usize, pub autofilter: bool, pub alpha_compression: bool, pub alpha_filtering: usize, pub alpha_quality: usize, pub pass: usize, pub show_compressed: bool, pub preprocessing: bool, pub partitions: usize, pub partition_limit: isize, pub use_sharp_yuv: bool,
}

Parameters related to lossy compression only

Fields

target_size: usize

if non-zero, set the desired target size in bytes. Takes precedence over the ‘compression’ parameter.

target_psnr: f32

if non-zero, specifies the minimal distortion to try to achieve. Takes precedence over target_size.

segments: usize

maximum number of segments to use, in [1..4]

sns_strength: usize

Spatial Noise Shaping. 0=off, 100=maximum.

filter_strength: usize

range: [0 = off .. 100 = strongest]

filter_sharpness: usize

range: [0 = off .. 7 = least sharp]

filter_type: usize

filtering type: 0 = simple, 1 = strong (only used if filter_strength > 0 or autofilter > 0)

autofilter: bool

Auto adjust filter’s strength [false = off, true = on]

alpha_compression: bool

Algorithm for encoding the alpha plane (false = none, true = compressed with WebP lossless). Default is true.

alpha_filtering: usize

Predictive filtering method for alpha plane. 0: none, 1: fast, 2: best. Default if 1.

alpha_quality: usize

Between 0 (smallest size) and 100 (lossless). Default is 100.

pass: usize

number of entropy-analysis passes (in [1..10]).

show_compressed: bool

if true, export the compressed picture back. In-loop filtering is not applied.

preprocessing: bool

preprocessing filter (0=none, 1=segment-smooth)

partitions: usize

log2(number of token partitions) in [0..3] Default is set to 0 for easier progressive decoding.

partition_limit: isize

quality degradation allowed to fit the 512k limit on prediction modes coding (0: no degradation, 100: maximum possible degradation).

use_sharp_yuv: bool

if needed, use sharp (and slow) RGB->YUV conversion

Implementations

impl LossyEncodingConfig[src]

Trait Implementations

impl Clone for LossyEncodingConfig[src]

fn clone(&self) -> LossyEncodingConfig[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for LossyEncodingConfig[src]

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

Formats the value using the given formatter. Read more

impl Default for LossyEncodingConfig[src]

fn default() -> Self[src]

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

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

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.

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

Performs the conversion.

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.

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

Performs the conversion.