summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-11-02 17:22:48 -0400
committerTavian Barnes <tavianator@tavianator.com>2021-11-02 17:22:48 -0400
commitd43d85d258f8125d67ec3beb8389ca531b1bc280 (patch)
tree4914f7d2bbcbc141b9ee0bdc67793933e7913af0 /src/main.rs
parent798a7a6193cb0dda18788034941275bb9f75ec56 (diff)
downloadkd-forest-d43d85d258f8125d67ec3beb8389ca531b1bc280.tar.xz
Write PNG frames faster
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index d4c39fb..9107079 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -14,7 +14,7 @@ use crate::frontier::Frontier;
use clap::{self, clap_app, crate_authors, crate_name, crate_version};
use image::{self, ColorType, ImageError, Rgba, RgbaImage};
-use image::png::PngEncoder;
+use image::png::{CompressionType, FilterType, PngEncoder};
use rand::{self, SeedableRng};
use rand_pcg::Pcg64;
@@ -391,7 +391,7 @@ impl App {
let stdout = io::stdout();
let writer = BufWriter::new(stdout.lock());
- let encoder = PngEncoder::new(writer);
+ let encoder = PngEncoder::new_with_quality(writer, CompressionType::Rle, FilterType::NoFilter);
encoder.encode(image, image.width(), image.height(), ColorType::Rgba8)?;
Ok(())