diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-11-21 11:39:50 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-11-21 11:39:50 -0500 |
commit | 22f45531e07dfd3f2b7b1639ef2d1860973c51ae (patch) | |
tree | bedf7cbe50ea4930f9df5fd14fbb99621b9a99c9 /src/main.rs | |
parent | ea4f7c6b150079c697cab76d1a95c6f6e04ca5c8 (diff) | |
download | kd-forest-22f45531e07dfd3f2b7b1639ef2d1860973c51ae.tar.xz |
Bump image to 0.24.7
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 09e335a..e9df476 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,8 +13,8 @@ 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::{CompressionType, FilterType, PngEncoder}; +use image::{self, ColorType, ImageEncoder, ImageError, Rgba, RgbaImage}; +use image::codecs::png::{CompressionType, FilterType, PngEncoder}; use rand::{self, SeedableRng}; use rand_pcg::Pcg64; @@ -395,8 +395,8 @@ impl App { } let writer = BufWriter::new(stdout.lock()); - let encoder = PngEncoder::new_with_quality(writer, CompressionType::Rle, FilterType::NoFilter); - encoder.encode(image, image.width(), image.height(), ColorType::Rgba8)?; + let encoder = PngEncoder::new_with_quality(writer, CompressionType::Fast, FilterType::NoFilter); + encoder.write_image(image, image.width(), image.height(), ColorType::Rgba8)?; Ok(()) } |