Skip to content
Open
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
10 changes: 10 additions & 0 deletions src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,16 @@ impl<W: JfifWrite> Encoder<W> {
self.density
}

/// Set quality setting. Quality must be between 1 and 100 where 100 is the highest image quality.
pub fn set_quality(&mut self, quality: u8) {
self.quality = quality;
}

/// Get quality setting
pub fn quality(&self) -> u8 {
self.quality
}

/// Set chroma subsampling factor
pub fn set_sampling_factor(&mut self, sampling: SamplingFactor) {
self.sampling_factor = sampling;
Expand Down