Skip to main content

Module effort

Module effort 

Source
Expand description

Map cwebp’s effort dials onto the three-level codec presets.

For lossless output all of cwebp’s numeric effort knobs (-m / -z / -q) collapse onto the three-level Effort, chosen so each flag’s default (-m 4 / -z 6 / -q 75) lands on Balanced; when several are given, -m wins over -z wins over -q. For lossy output -q is the real quality (not effort), so only -m selects the effort Effort, using the same three-tier -m buckets.

Functions§

lossy_method
Resolve the lossy effort Effort from -m alone (Balanced by default), using the same three-tier -m buckets as the lossless path.
lossy_quality
Clamp a cwebp -q float to the encoder’s integer quality (0..=100).
resolve
Resolve the lossless effort flags to an Effort (Balanced when none given).