Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect documentation of AvifEncoder::new_with_speed_quality #2106

Merged
merged 1 commit into from
Jan 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/codecs/avif/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ impl<W: Write> AvifEncoder<W> {
AvifEncoder::new_with_speed_quality(w, 4, 80) // `cavif` uses these defaults
}

/// Create a new encoder with specified speed and quality, that writes its output to `w`.
/// `speed` accepts a value in the range 0-10, where 0 is the slowest and 10 is the fastest.
/// `quality` accepts a value in the range 0-100, where 0 is the worst and 100 is the best.
/// Create a new encoder with a specified speed and quality that writes its output to `w`.
/// `speed` accepts a value in the range 1-10, where 1 is the slowest and 10 is the fastest.
/// Slower speeds generally yield better compression results.
/// `quality` accepts a value in the range 1-100, where 1 is the worst and 100 is the best.
pub fn new_with_speed_quality(w: W, speed: u8, quality: u8) -> Self {
// Clamp quality and speed to range
let quality = min(quality, 100);
Expand Down
Loading