#[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_int
Lossless encoding (0=lossy(default), 1=lossless).
quality: c_float
between 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_int
quality/speed trade-off (0=fast, 6=slower-better)
image_hint: WebPImageHint
Hint for image type (lossless only for now).
target_size: c_int
if non-zero, set the desired target size in bytes.
Takes precedence over the compression
parameter.
target_PSNR: c_float
if non-zero, specifies the minimal distortion to try to achieve. Takes precedence over target_size.
segments: c_int
maximum number of segments to use, in [1..4]
sns_strength: c_int
Spatial Noise Shaping. 0=off, 100=maximum.
filter_strength: c_int
range: [0 = off .. 100 = strongest]
filter_sharpness: c_int
range: [0 = off .. 7 = least sharp]
filter_type: c_int
filtering type: 0 = simple, 1 = strong (only used if filter_strength > 0 or autofilter > 0)
autofilter: c_int
Auto adjust filter’s strength [0 = off, 1 = on]
alpha_compression: c_int
Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). Default is 1.
alpha_filtering: c_int
Predictive filtering method for alpha plane. 0: none, 1: fast, 2: best. Default if 1.
alpha_quality: c_int
Between 0 (smallest size) and 100 (lossless). Default is 100.
pass: c_int
number of entropy-analysis passes (in [1..10]).
show_compressed: c_int
if true, export the compressed picture back. In-loop filtering is not applied.
preprocessing: c_int
preprocessing filter: 0=none, 1=segment-smooth, 2=pseudo-random dithering
partitions: c_int
log2(number of token partitions) in [0..3]. Default is set to 0 for easier progressive decoding.
partition_limit: c_int
quality degradation allowed to fit the 512k limit on prediction modes coding (0: no degradation, 100: maximum possible degradation).
emulate_jpeg_size: c_int
If 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_int
If non-zero, try and use multi-threaded encoding.
low_memory: c_int
If set, reduce memory usage (but increase CPU use).
near_lossless: c_int
0_5
only.Near lossless encoding [0 = max loss .. 100 = off (default)].
exact: c_int
0_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_int
0_6
only.reserved
use_sharp_yuv: c_int
0_6
only.if needed, use sharp (and slow) RGB->YUV conversion
qmin: c_int
1_2
only.minimum permissible quality factor
qmax: c_int
1_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