From 137c7f08fd1b904c36fcb148e8e7c7d59d3976c8 Mon Sep 17 00:00:00 2001 From: Kornel Date: Sun, 8 Aug 2021 17:03:39 +0100 Subject: [PATCH] Use q=90 as default --- src/bin/gifski.rs | 1 + src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/gifski.rs b/src/bin/gifski.rs index bc74b42..1d24d21 100644 --- a/src/bin/gifski.rs +++ b/src/bin/gifski.rs @@ -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") diff --git a/src/lib.rs b/src/lib.rs index c8f9395..e9b8a4d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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)); } }