pub struct WebPConfig {Show 16 fields
pub quality: u8,
pub method: u8,
pub lossless: bool,
pub near_lossless: u8,
pub segments: u8,
pub sns_strength: u8,
pub filter_strength: u8,
pub filter_sharpness: u8,
pub auto_filter: bool,
pub alpha_compression: bool,
pub alpha_filtering: u8,
pub alpha_quality: u8,
pub pass: u8,
pub thread_count: usize,
pub low_memory: bool,
pub exact: bool,
}Expand description
WebP encoding configuration
Fields§
§quality: u8Quality factor (0-100, where 100 is best quality)
method: u8Compression method (0-6, where 0 is fastest, 6 is best compression)
lossless: boolEnable lossless compression
near_lossless: u8Near-lossless encoding quality (0-100, only with lossless=true)
segments: u8Number of segments (1-4)
sns_strength: u8Spatial noise shaping strength (0-100)
filter_strength: u8Filter strength (0-100)
filter_sharpness: u8Filter sharpness (0-7)
auto_filter: boolEnable auto-filter
alpha_compression: boolAlpha channel compression (true = compressed, false = uncompressed)
alpha_filtering: u8Alpha filtering level (0-2)
alpha_quality: u8Alpha quality (0-100)
pass: u8Number of entropy-analysis passes (1-10)
thread_count: usizeThread count (0 = auto-detect)
low_memory: boolEnable low memory mode
exact: boolPreserve RGB values under transparency
Implementations§
Source§impl WebPConfig
impl WebPConfig
Sourcepub fn high_quality() -> Self
pub fn high_quality() -> Self
Create a high-quality preset
Trait Implementations§
Source§impl Clone for WebPConfig
impl Clone for WebPConfig
Source§fn clone(&self) -> WebPConfig
fn clone(&self) -> WebPConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebPConfig
impl Debug for WebPConfig
Auto Trait Implementations§
impl Freeze for WebPConfig
impl RefUnwindSafe for WebPConfig
impl Send for WebPConfig
impl Sync for WebPConfig
impl Unpin for WebPConfig
impl UnwindSafe for WebPConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more