#[repr(C)]pub struct WebPConfig {Show 29 fields
pub lossless: c_int,
pub quality: c_float,
pub method: c_int,
pub image_hint: WebPImageHint,
pub target_size: c_int,
pub target_PSNR: c_float,
pub segments: c_int,
pub sns_strength: c_int,
pub filter_strength: c_int,
pub filter_sharpness: c_int,
pub filter_type: c_int,
pub autofilter: c_int,
pub alpha_compression: c_int,
pub alpha_filtering: c_int,
pub alpha_quality: c_int,
pub pass: c_int,
pub show_compressed: c_int,
pub preprocessing: c_int,
pub partitions: c_int,
pub partition_limit: c_int,
pub emulate_jpeg_size: c_int,
pub thread_level: c_int,
pub low_memory: c_int,
pub near_lossless: c_int,
pub exact: c_int,
pub use_delta_palette: c_int,
pub use_sharp_yuv: c_int,
pub qmin: c_int,
pub qmax: c_int,
}Expand description
Compression parameters.
Fields§
§lossless: c_intLossless encoding (0=lossy(default), 1=lossless).
quality: c_floatbetween 0 and 100. For lossy, 0 gives the smallest size and 100 the largest. For lossless, this parameter is the amount of effort put into the compression: 0 is the fastest but gives larger files compared to the slowest, but best, 100.
method: c_intquality/speed trade-off (0=fast, 6=slower-better)
image_hint: WebPImageHintHint for image type (lossless only for now).
target_size: c_intif non-zero, set the desired target size in bytes.
Takes precedence over the compression parameter.
target_PSNR: c_floatif non-zero, specifies the minimal distortion to try to achieve. Takes precedence over target_size.
segments: c_intmaximum number of segments to use, in [1..4]
sns_strength: c_intSpatial Noise Shaping. 0=off, 100=maximum.
filter_strength: c_intrange: [0 = off .. 100 = strongest]
filter_sharpness: c_intrange: [0 = off .. 7 = least sharp]
filter_type: c_intfiltering type: 0 = simple, 1 = strong (only used if filter_strength > 0 or autofilter > 0)
autofilter: c_intAuto adjust filter’s strength [0 = off, 1 = on]
alpha_compression: c_intAlgorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). Default is 1.
alpha_filtering: c_intPredictive filtering method for alpha plane. 0: none, 1: fast, 2: best. Default if 1.
alpha_quality: c_intBetween 0 (smallest size) and 100 (lossless). Default is 100.
pass: c_intnumber of entropy-analysis passes (in [1..10]).
show_compressed: c_intif true, export the compressed picture back. In-loop filtering is not applied.
preprocessing: c_intpreprocessing filter: 0=none, 1=segment-smooth, 2=pseudo-random dithering
partitions: c_intlog2(number of token partitions) in [0..3]. Default is set to 0 for easier progressive decoding.
partition_limit: c_intquality degradation allowed to fit the 512k limit on prediction modes coding (0: no degradation, 100: maximum possible degradation).
emulate_jpeg_size: c_intIf true, compression parameters will be remapped to better match the expected output size from JPEG compression. Generally, the output size will be similar but the degradation will be lower.
thread_level: c_intIf non-zero, try and use multi-threaded encoding.
low_memory: c_intIf set, reduce memory usage (but increase CPU use).
near_lossless: c_int0_5 only.Near lossless encoding [0 = max loss .. 100 = off (default)].
exact: c_int0_5 only.if non-zero, preserve the exact RGB values under transparent area. Otherwise, discard this invisible RGB information for better compression. The default value is 0.
use_delta_palette: c_int0_6 only.reserved
use_sharp_yuv: c_int0_6 only.if needed, use sharp (and slow) RGB->YUV conversion
qmin: c_int1_2 only.minimum permissible quality factor
qmax: c_int1_2 only.maximum permissible quality factor
Trait Implementations§
Source§impl Clone for WebPConfig
impl Clone for WebPConfig
Source§fn clone(&self) -> WebPConfig
fn clone(&self) -> WebPConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more