Skip to content

Commit

Permalink
Use q=90 as default
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Aug 8, 2021
1 parent 3eec1a6 commit 137c7f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/bin/gifski.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ fn bin_main() -> BinResult<()> {
.short("Q")
.value_name("1-100")
.takes_value(true)
.default_value("90")
.help("Lower quality may give smaller file"))
.arg(Arg::with_name("width")
.long("width")
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ impl Writer {
// if denoiser says the background didn't change, then believe it
// (except higher quality settings, which try to improve it every time)
let bg_keep_likelyhood = settings.quality.saturating_sub(80) / 4;
if settings.quality < 100 && (consecutive_frame_num % 5) >= bg_keep_likelyhood {
if settings.fast || (settings.quality < 100 && (consecutive_frame_num % 5) >= bg_keep_likelyhood) {
image.pixels_mut().zip(&importance_map).filter(|&(_, &m)| m == 0).for_each(|(px, _)| *px = RGBA8::new(0,0,0,0));
}
}
Expand Down

0 comments on commit 137c7f0

Please sign in to comment.