diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-11-02 17:22:48 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2021-11-02 17:22:48 -0400 |
commit | d43d85d258f8125d67ec3beb8389ca531b1bc280 (patch) | |
tree | 4914f7d2bbcbc141b9ee0bdc67793933e7913af0 /src | |
parent | 798a7a6193cb0dda18788034941275bb9f75ec56 (diff) | |
download | kd-forest-d43d85d258f8125d67ec3beb8389ca531b1bc280.tar.xz |
Write PNG frames faster
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 4 |
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(()) |