pub struct Config {
pub quality: f32,
pub alpha_quality: f32,
pub speed: u8,
pub premultiplied_alpha: bool,
pub color_space: ColorSpace,
pub threads: Option<usize>,
}Expand description
Encoder configuration struct
See encode_rgba
Fields
quality: f320-100 scale
alpha_quality: f320-100 scale
speed: u8rav1e preset 1 (slow) 10 (fast but crappy)
premultiplied_alpha: boolTrue if RGBA input has already been premultiplied. It inserts appropriate metadata.
color_space: ColorSpaceWhich pixel format to use in AVIF file. RGB tends to give larger files.
threads: Option<usize>How many threads should be used (0 = match core count), None - use global rayon thread pool
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EncConfig
impl Send for EncConfig
impl Sync for EncConfig
impl Unpin for EncConfig
impl UnwindSafe for EncConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more