We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06cdae3 commit 130e04dCopy full SHA for 130e04d
src/lib.rs
@@ -411,6 +411,9 @@ impl Writer {
411
100 // the first frame is too important to ruin it
412
};
413
liq.set_quality(0, quality)?;
414
+ if settings.s.quality < 50 {
415
+ liq.set_max_colors(u32::from(settings.s.quality * 2).max(16).next_power_of_two())?;
416
+ }
417
let (buf, width, height) = image.into_contiguous_buf();
418
let mut img = liq.new_image(buf, width, height, 0.)?;
419
// only later remapping tracks which area has been damaged by transparency
0 commit comments